Skip to content
Snippets Groups Projects
Commit 3e7eaacd authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

CMake hpp-fcl compat: fix for CMake < 3.18

parent 1b20de92
No related branches found
No related tags found
No related merge requests found
...@@ -3,4 +3,15 @@ ...@@ -3,4 +3,15 @@
message(WARNING "Please update your CMake from 'hpp-fcl' to 'coal'") message(WARNING "Please update your CMake from 'hpp-fcl' to 'coal'")
find_package(coal REQUIRED) find_package(coal REQUIRED)
add_library(hpp-fcl::hpp-fcl ALIAS coal::coal)
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)
endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment