mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[OpenMesh] Use the official usage (#36380)
* [OpenMesh] Use the official usage * version * fix path * version * cmake config path * version
This commit is contained in:
parent
75e0c3dc8f
commit
03cc8d53be
31
ports/openmesh/fix-library-install-path.patch
Normal file
31
ports/openmesh/fix-library-install-path.patch
Normal file
@ -0,0 +1,31 @@
|
||||
diff --git a/src/OpenMesh/Core/CMakeLists.txt b/src/OpenMesh/Core/CMakeLists.txt
|
||||
index 7a5269c..e3f87ff 100644
|
||||
--- a/src/OpenMesh/Core/CMakeLists.txt
|
||||
+++ b/src/OpenMesh/Core/CMakeLists.txt
|
||||
@@ -146,7 +146,7 @@ target_include_directories(OpenMeshCore PUBLIC
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
|
||||
install(TARGETS OpenMeshCore EXPORT OpenMeshConfig
|
||||
- ARCHIVE DESTINATION ${VCI_PROJECT_LIBDIR}
|
||||
- LIBRARY DESTINATION ${VCI_PROJECT_LIBDIR}
|
||||
- RUNTIME DESTINATION ${VCI_PROJECT_BINDIR})
|
||||
+ ARCHIVE DESTINATION lib
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ RUNTIME DESTINATION bin)
|
||||
|
||||
diff --git a/src/OpenMesh/Tools/CMakeLists.txt b/src/OpenMesh/Tools/CMakeLists.txt
|
||||
index 0170e2b..e40dfa1 100644
|
||||
--- a/src/OpenMesh/Tools/CMakeLists.txt
|
||||
+++ b/src/OpenMesh/Tools/CMakeLists.txt
|
||||
@@ -126,7 +126,8 @@ target_include_directories(OpenMeshTools PUBLIC
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
|
||||
install(TARGETS OpenMeshTools EXPORT OpenMeshConfig
|
||||
- ARCHIVE DESTINATION ${VCI_PROJECT_LIBDIR}
|
||||
- LIBRARY DESTINATION ${VCI_PROJECT_LIBDIR}
|
||||
- RUNTIME DESTINATION ${VCI_PROJECT_BINDIR})
|
||||
+ ARCHIVE DESTINATION lib
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ RUNTIME DESTINATION bin
|
||||
+)
|
||||
|
@ -8,6 +8,8 @@ vcpkg_download_distfile(ARCHIVE
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
PATCHES
|
||||
fix-library-install-path.patch
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
@ -28,7 +30,7 @@ vcpkg_cmake_configure(
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH share/OpenMesh/cmake)
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME OpenMesh CONFIG_PATH "share/OpenMesh/cmake")
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/libdata/pkgconfig" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
|
||||
@ -55,6 +57,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/OpenMesh/vcpkg-cmake-wrapper.cmake" @ONLY)
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
@ -1,5 +0,0 @@
|
||||
The package openmesh provides CMake targets:
|
||||
|
||||
find_package(openmesh REQUIRED)
|
||||
target_include_directories(main PRIVATE ${OPENMESH_INCLUDE_DIRS})
|
||||
target_link_libraries(main PRIVATE ${OPENMESH_LIBRARIES})
|
@ -1,18 +0,0 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
include(SelectLibraryConfigurations)
|
||||
|
||||
find_path(OPENMESHCORE_INCLUDE_DIR EigenVectorT.hh PATH_SUFFIXES OpenMesh/Core/Geometry)
|
||||
get_filename_component(OPENMESHCORE_INCLUDE_DIR ${OPENMESHCORE_INCLUDE_DIR} DIRECTORY)
|
||||
get_filename_component(OPENMESHCORE_INCLUDE_DIR ${OPENMESHCORE_INCLUDE_DIR} DIRECTORY)
|
||||
get_filename_component(OPENMESHCORE_INCLUDE_DIR ${OPENMESHCORE_INCLUDE_DIR} DIRECTORY)
|
||||
|
||||
find_library(OPENMESHCORE_LIBRARY_DEBUG NAMES OpenMeshCored libOpenMeshCored NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED)
|
||||
find_library(OPENMESHCORE_LIBRARY_RELEASE NAMES OpenMeshCore libOpenMeshCore NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED)
|
||||
find_library(OPENMESHTOOLS_LIBRARY_DEBUG NAMES OpenMeshToolsd libOpenMeshToolsd NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED)
|
||||
find_library(OPENMESHTOOLS_LIBRARY_RELEASE NAMES OpenMeshTools libOpenMeshTools NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED)
|
||||
|
||||
select_library_configurations(OPENMESHCORE)
|
||||
select_library_configurations(OPENMESHTOOLS)
|
||||
|
||||
set(OPENMESH_INCLUDE_DIRS ${OPENMESHCORE_INCLUDE_DIR})
|
||||
set(OPENMESH_LIBRARIES ${OPENMESHCORE_LIBRARY} ${OPENMESHTOOLS_LIBRARY})
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "openmesh",
|
||||
"version": "9.0",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "A generic and efficient polygon mesh data structure",
|
||||
"homepage": "https://www.graphics.rwth-aachen.de/media/openmesh_static/Daily-Builds/Doc/index.html",
|
||||
"license": "BSD-3-Clause",
|
||||
|
@ -6378,7 +6378,7 @@
|
||||
},
|
||||
"openmesh": {
|
||||
"baseline": "9.0",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"openmpi": {
|
||||
"baseline": "4.1.6",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "8228f40bfdd38a2049f284b9a1d0b6e58ce86c57",
|
||||
"version": "9.0",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "8df48dff71b98687732978a2fa7a44083d6c9cd3",
|
||||
"version": "9.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user