Skip to content

Commit

Permalink
Merge pull request #5 from jorisv/topic/install-compatibility-layer
Browse files Browse the repository at this point in the history
Add install-hpp-fcl-compatibility target
  • Loading branch information
lmontaut authored Nov 20, 2024
2 parents e9ba840 + 1b6b198 commit 8c85b02
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ SET(${PROJECT_NAME}_HEADERS
)

if(COAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL)
LIST(APPEND ${PROJECT_NAME}_HEADERS
SET(HPP_FCL_BACKWARD_COMPATIBILITY_HEADERS
include/hpp/fcl/broadphase/broadphase_bruteforce.h
include/hpp/fcl/broadphase/broadphase_callbacks.h
include/hpp/fcl/broadphase/broadphase_collision_manager.h
Expand Down Expand Up @@ -444,6 +444,8 @@ if(COAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL)
include/hpp/fcl/timings.h
include/hpp/fcl/warning.hh
)
LIST(APPEND ${PROJECT_NAME}_HEADERS ${HPP_FCL_BACKWARD_COMPATIBILITY_HEADERS})
HEADER_INSTALL(COMPONENT hpp-fcl-compatibility ${HPP_FCL_BACKWARD_COMPATIBILITY_HEADERS})
endif()

IF(COAL_HAS_OCTOMAP)
Expand Down Expand Up @@ -485,7 +487,11 @@ if(COAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL)
write_basic_package_version_file(hpp-fclConfigVersion.cmake
VERSION 3.0.0
COMPATIBILITY AnyNewerVersion)
install(FILES hpp-fclConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/hpp-fclConfigVersion.cmake DESTINATION lib/cmake/hpp-fcl)
install(FILES hpp-fclConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/hpp-fclConfigVersion.cmake
DESTINATION lib/cmake/hpp-fcl
COMPONENT hpp-fcl-compatibility)
include("${JRL_CMAKE_MODULES}/install-helpers.cmake")
add_install_target(NAME hpp-fcl-compatibility COMPONENT hpp-fcl-compatibility)
endif()

setup_project_finalize()
2 changes: 1 addition & 1 deletion cmake
Submodule cmake updated 90 files
+0 −240 .cmake-format.py
+1 −0 .docs/cmake.py
+1 −4 .docs/examples/minimal-with-packages.cmake
+2 −0 .gersemirc
+3 −0 .git-blame-ignore-revs
+11 −20 .pre-commit-config.yaml
+109 −97 CMakeLists.txt
+7 −3 _unittests/catkin/CMakeLists.txt
+7 −3 _unittests/cpp/CMakeLists.txt
+8 −4 _unittests/test_pkg-config.cmake
+6 −2 apple.cmake
+69 −45 base.cmake
+113 −63 boost.cmake
+56 −42 compiler.cmake
+30 −68 coverage.cmake
+24 −11 cpack.cmake
+4 −2 createshexe.cmake
+71 −38 cxx-standard.cmake
+2 −1 cxx11.cmake
+322 −159 cython/cython.cmake
+34 −18 debian.cmake
+21 −15 dist.cmake
+92 −68 distcheck.cmake
+134 −77 doxygen.cmake
+12 −6 eigen.cmake
+11 −8 find-external/Accelerate/FindAccelerate.cmake
+13 −10 find-external/CDD/FindCDD.cmake
+59 −37 find-external/CHOLMOD/FindCHOLMOD.cmake
+12 −13 find-external/CLP/FindCLP.cmake
+19 −13 find-external/CoinUtils/FindCoinUtils.cmake
+18 −8 find-external/CppAD/Findcppad.cmake
+21 −10 find-external/CppAD/Findcppadcg.cmake
+15 −14 find-external/GMP/FindGMP.cmake
+61 −0 find-external/Ipopt/FindIpopt.cmake
+55 −27 find-external/Julia/FindJulia.cmake
+51 −26 find-external/MPFR/FindMPFR.cmake
+384 −263 find-external/OpenMP/FindOpenMP.cmake
+44 −27 find-external/OpenRTM/FindOpenRTM.cmake
+64 −34 find-external/Qhull/FindQhull.cmake
+15 −9 find-external/Simde/FindSimde.cmake
+9 −7 find-external/TinyXML/FindTinyXML.cmake
+30 −14 find-external/TinyXML/FindTinyXML2.cmake
+51 −26 find-external/assimp/Findassimp.cmake
+21 −17 find-external/glpk/Findglpk.cmake
+24 −12 find-external/qpOASES/FindqpOASES.cmake
+31 −14 geometric-tools.cmake
+19 −17 gtest.cmake
+88 −30 header.cmake
+2 −6 hpp.cmake
+16 −10 ide.cmake
+54 −33 idl.cmake
+28 −15 idlrtc.cmake
+8 −4 image/visp.cmake
+2 −1 install-data.cmake
+49 −0 install-helpers.cmake
+14 −7 julia.cmake
+30 −19 kineo.cmake
+2 −1 lapack.cmake
+69 −34 logging.cmake
+11 −6 man.cmake
+8 −5 metapodfromurdf.cmake
+23 −8 modernize-links.cmake
+43 −21 msvc-specific.cmake
+5 −3 openhrp.cmake
+23 −10 openhrpcontroller.cmake
+9 −6 openrtm.cmake
+133 −71 package-config.cmake
+360 −254 pkg-config.cmake
+10 −7 portability.cmake
+7 −2 post-project.cmake
+8 −3 pthread.cmake
+78 −14 python-helpers.cmake
+162 −92 python.cmake
+59 −31 qhull.cmake
+28 −30 release.cmake
+6 −2 relpath.cmake
+35 −17 ros.cmake
+54 −0 ros2.cmake
+12 −3 sdformat.cmake
+8 −3 shared-library.cmake
+44 −23 sphinx.cmake
+38 −22 stubs.cmake
+21 −10 swig.cmake
+69 −43 test.cmake
+124 −0 tracy.cmake
+33 −0 tracy.hh.cmake
+30 −20 uninstall.cmake
+17 −8 version-script.cmake
+43 −37 version.cmake
+14 −17 xacro.cmake
17 changes: 7 additions & 10 deletions hpp-fclConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ message(WARNING "Please update your CMake from 'hpp-fcl' to 'coal'")

find_package(coal REQUIRED)

if(CMAKE_VERSION VERSION_LESS "3.18.0")
if(NOT TARGET hpp-fcl::hpp-fcl)
add_library(hpp-fcl::hpp-fcl SHARED IMPORTED)
target_link_libraries(hpp-fcl::hpp-fcl INTERFACE coal::coal)
get_property(_cfg TARGET coal::coal PROPERTY IMPORTED_CONFIGURATIONS)
get_property(_loc TARGET coal::coal PROPERTY "IMPORTED_LOCATION_${_cfg}")
set_property(TARGET hpp-fcl::hpp-fcl PROPERTY IMPORTED_LOCATION "${_loc}")
endif()
else()
add_library(hpp-fcl::hpp-fcl ALIAS coal::coal)
if(NOT TARGET hpp-fcl::hpp-fcl)
add_library(hpp-fcl::hpp-fcl SHARED IMPORTED)
target_link_libraries(hpp-fcl::hpp-fcl INTERFACE coal::coal)
get_property(_cfg TARGET coal::coal PROPERTY IMPORTED_CONFIGURATIONS)
get_property(_loc TARGET coal::coal PROPERTY "IMPORTED_LOCATION_${_cfg}")
set_property(TARGET hpp-fcl::hpp-fcl PROPERTY IMPORTED_LOCATION "${_loc}")
target_compile_definitions(hpp-fcl::hpp-fcl INTERFACE COAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL)
endif()
4 changes: 2 additions & 2 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,6 @@ ENDFOREACH(python)


if(COAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL)
python_install_on_site(hppfcl __init__.py)
python_install_on_site(hppfcl viewer.py)
python_install_on_site(hppfcl __init__.py COMPONENT hpp-fcl-compatibility)
python_install_on_site(hppfcl viewer.py COMPONENT hpp-fcl-compatibility)
endif()

0 comments on commit 8c85b02

Please sign in to comment.