From a81a51650542ab4db32249f7c596991c4805d0dc Mon Sep 17 00:00:00 2001 From: Tobias Kohlbau Date: Tue, 5 Dec 2017 13:15:47 +0100 Subject: [PATCH] fcl: add missing dependencies within cmake Signed-off-by: Tobias Kohlbau --- ports/fcl/0002-fix_dependencies.patch | 14 ++++++++++++++ ports/fcl/CONTROL | 2 +- ports/fcl/portfile.cmake | 8 +++++++- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 ports/fcl/0002-fix_dependencies.patch diff --git a/ports/fcl/0002-fix_dependencies.patch b/ports/fcl/0002-fix_dependencies.patch new file mode 100644 index 000000000..34b069291 --- /dev/null +++ b/ports/fcl/0002-fix_dependencies.patch @@ -0,0 +1,14 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 5ce1f77..1f3e863 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -10,8 +10,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES + SOVERSION ${FCL_ABI_VERSION}) + + target_link_libraries(${PROJECT_NAME} +- PUBLIC ${OCTOMAP_LIBRARIES} +- PRIVATE ${CCD_LIBRARIES} ++ PUBLIC octomap octomath ccd + PRIVATE ${Boost_LIBRARIES}) + + target_include_directories(${PROJECT_NAME} INTERFACE diff --git a/ports/fcl/CONTROL b/ports/fcl/CONTROL index daadff075..84a9c1f5b 100644 --- a/ports/fcl/CONTROL +++ b/ports/fcl/CONTROL @@ -1,4 +1,4 @@ Source: fcl -Version: 0.5.0-2 +Version: 0.5.0-3 Description: a library for performing three types of proximity queries on a pair of geometric models composed of triangles Build-Depends: boost, ccd, octomap diff --git a/ports/fcl/portfile.cmake b/ports/fcl/portfile.cmake index e0cee7e02..851a013c2 100644 --- a/ports/fcl/portfile.cmake +++ b/ports/fcl/portfile.cmake @@ -16,7 +16,8 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_fix_package_detection.patch) + ${CMAKE_CURRENT_LIST_DIR}/0001_fix_package_detection.patch + ${CMAKE_CURRENT_LIST_DIR}/0002-fix_dependencies.patch) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(FCL_STATIC_LIBRARY ON) @@ -37,6 +38,11 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake/") +file(READ ${CURRENT_PACKAGES_DIR}/share/fcl/fclConfig.cmake FCL_CONFIG) +string(REPLACE "unset(_expectedTargets)" + "unset(_expectedTargets)\n\nfind_package(octomap REQUIRED)\nfind_package(ccd REQUIRED)" FCL_CONFIG "${FCL_CONFIG}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/fcl/fclConfig.cmake "${FCL_CONFIG}") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fcl RENAME copyright)