norlab-ulaval / libpointmatcher

An Iterative Closest Point (ICP) library for 2D and 3D mapping in Robotics
BSD 3-Clause "New" or "Revised" License
1.58k stars 542 forks source link

Add libpointmatcher_INCLUDE_DIR to match with CGAL #446

Closed maximecharriere closed 3 years ago

maximecharriere commented 3 years ago

When using libpointmatcher with CGAL, <pointmatcher/PointMatcher.h> can't be found because libpointmatcher is not added to the list of included directories.
The reason for this is that CGAL wait for the libpointmatcher_INCLUDE_DIR variable when libpointmatcher set the libpointmatcher_INCLUDE_DIRS variable (with a S)


CGAL_pointmatcher_support.cmake

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}")

endif()
ethzasl-jenkins commented 3 years ago

Can one of the admins verify this patch?

pomerlef commented 3 years ago

ok to test

pomerlef commented 3 years ago

thanks!