Change libpointmatcher_support so it won't fail when old boost has been used to build pointmatcher.

This commit is contained in:
Maxime Gimeno 2021-01-14 13:58:15 +01:00
parent 51139430c2
commit fa22cd972b
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,6 @@
if(libpointmatcher_FOUND AND NOT TARGET CGAL::pointmatcher_support)
add_library(CGAL::pointmatcher_support INTERFACE IMPORTED)
set_target_properties(CGAL::pointmatcher_support PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "CGAL_LINKED_WITH_POINTMATCHER"
INTERFACE_INCLUDE_DIRECTORIES "${libpointmatcher_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${libpointmatcher_LIBRARIES}")
target_compile_definitions(CGAL::pointmatcher_support INTERFACE "CGAL_LINKED_WITH_POINTMATCHER")
target_include_directories(CGAL::pointmatcher_support INTERFACE "${libpointmatcher_INCLUDE_DIR}")
target_link_libraries(CGAL::pointmatcher_support INTERFACE "${libpointmatcher_LIBRARIES}")
endif()

View File

@ -93,6 +93,7 @@ if ( CGAL_FOUND )
find_package(libpointmatcher QUIET)
include(CGAL_pointmatcher_support)
if (TARGET CGAL::pointmatcher_support)
find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono REQUIRED)
add_executable(registration_with_pointmatcher "registration_with_pointmatcher.cpp")
target_link_libraries(registration_with_pointmatcher
${CGAL_libs} CGAL::pointmatcher_support)