mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 17:41:09 +08:00
[tinyply] Add new port (#11534)
* [tinyply] Add new port * [tinyply] CMake patch
This commit is contained in:
parent
924eb89478
commit
01926a1eb1
4
ports/tinyply/CONTROL
Normal file
4
ports/tinyply/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: tinyply
|
||||
Version: 2020-05-22
|
||||
Description: C++11 ply 3d mesh format importer & exporter
|
||||
Homepage: https://github.com/ddiakopoulos/tinyply
|
27
ports/tinyply/fix-cmake.patch
Normal file
27
ports/tinyply/fix-cmake.patch
Normal file
@ -0,0 +1,27 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 2bd9563..4d4d9fe 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -50,6 +50,8 @@ set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")
|
||||
set(targets_export_name "${PROJECT_NAME}Targets")
|
||||
set(namespace "")
|
||||
|
||||
+include(GNUInstallDirs)
|
||||
+
|
||||
write_basic_package_version_file(
|
||||
"${version_config}"
|
||||
VERSION ${PROJECT_VERSION}
|
||||
@@ -63,9 +65,10 @@ configure_package_config_file(
|
||||
|
||||
# Install
|
||||
install(TARGETS tinyply EXPORT ${targets_export_name}
|
||||
- RUNTIME DESTINATION bin
|
||||
- ARCHIVE DESTINATION lib
|
||||
- LIBRARY DESTINATION lib)
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
install(FILES source/tinyply.h
|
||||
DESTINATION include)
|
||||
|
34
ports/tinyply/portfile.cmake
Normal file
34
ports/tinyply/portfile.cmake
Normal file
@ -0,0 +1,34 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO ddiakopoulos/tinyply
|
||||
REF ca7b279fb6c9af931ffdaed96a3b11ca3ccd79ea
|
||||
SHA512 d3adfe7cce849a14fd473cfd67baef0163d4e45ff32724516270d5893a18086f7ac17d87bda5c33381442766849b41516bd2c7757e97038c95af0c70d5f0edde
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
# TODO: Remove this patch if https://github.com/ddiakopoulos/tinyply/pull/41 was accepted.
|
||||
fix-cmake.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_LIB)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DSHARED_LIB=${SHARED_LIB}
|
||||
-DBUILD_TESTS=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# License
|
||||
file(READ "${SOURCE_PATH}/readme.md" readme_contents)
|
||||
string(FIND "${readme_contents}" "License" license_line_pos)
|
||||
string(SUBSTRING "${readme_contents}" ${license_line_pos} -1 license_contents)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "${license_contents}")
|
Loading…
x
Reference in New Issue
Block a user