diff --git a/Documentation/doc/Documentation/Third_party.txt b/Documentation/doc/Documentation/Third_party.txt
index 19f749fd800..e47e66e8f6d 100644
--- a/Documentation/doc/Documentation/Third_party.txt
+++ b/Documentation/doc/Documentation/Third_party.txt
@@ -161,11 +161,12 @@ executables should be linked with the CMake imported target
The \libpointmatcher web site is `https://github.com/ethz-asl/libpointmatcher`.
-\attention On Windows, we only support version 1.3.1 of PointMatcher with version 3.3.7 of Eigen, with some changes to the recipe at
+\attention On Windows, \libpointmatcher needs to be compiled with the flag BOOST_TIMER_ENABLE_DEPRECATED set as it uses a deprecated module from \boost.
+\attention On Windows, we support version 1.4.4 of \libpointmatcher with version 3.4.0 of Eigen.
+Alternatively, version 1.3.1 of \libpointmatcher is supported with version 3.3.7 of Eigen, with some changes to the recipe at
`https://github.com/ethz-asl/libpointmatcher/blob/master/doc/Compilation.md`:`NABO_INCLUDE_DIR` becomes `libnabo_INCLUDE_DIRS`
and `NABO_LIBRARY` becomes `libnabo_LIBRARIES` in the "Build libpointmatcher" section.
-
\subsection thirdpartyLeda LEDA
Version 6.2 or later
diff --git a/Installation/cmake/modules/CGAL_pointmatcher_support.cmake b/Installation/cmake/modules/CGAL_pointmatcher_support.cmake
index 4c2f9997368..16650ba6d9c 100644
--- a/Installation/cmake/modules/CGAL_pointmatcher_support.cmake
+++ b/Installation/cmake/modules/CGAL_pointmatcher_support.cmake
@@ -1,16 +1,26 @@
if(libpointmatcher_FOUND AND NOT TARGET CGAL::pointmatcher_support)
- find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono)
+ if (libpointmatcher_VERSION VERSION_GREATER_EQUAL "1.4.4")
+ find_package(Boost COMPONENTS thread system program_options date_time chrono)
+ else()
+ find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono)
+ endif()
+
if(Boost_chrono_FOUND
- AND Boost_thread_FOUND
- AND Boost_filesystem_FOUND
- AND Boost_system_FOUND
- AND Boost_program_options_FOUND
- AND Boost_date_time_FOUND)
+ AND Boost_thread_FOUND
+ AND Boost_system_FOUND
+ AND Boost_program_options_FOUND
+ AND Boost_date_time_FOUND
+ AND (libpointmatcher_VERSION VERSION_GREATER_EQUAL "1.4.4" OR Boost_filesystem_FOUND))
add_library(CGAL::pointmatcher_support INTERFACE IMPORTED)
+ target_compile_options(CGAL::pointmatcher_support INTERFACE "-D_USE_MATH_DEFINES")
target_compile_definitions(CGAL::pointmatcher_support INTERFACE "CGAL_LINKED_WITH_POINTMATCHER")
target_include_directories(CGAL::pointmatcher_support INTERFACE "${libpointmatcher_INCLUDE_DIRS}")
target_link_libraries(CGAL::pointmatcher_support INTERFACE ${libpointmatcher_LIBRARIES} libnabo::nabo)
else()
- message(STATUS "NOTICE: the libpointmatcher library requires the following boost components: thread filesystem system program_options date_time chrono.")
+ if (libpointmatcher_VERSION VERSION_GREATER_EQUAL "1.4.4")
+ message(STATUS "NOTICE: the libpointmatcher library requires the following boost components: thread system program_options date_time chrono.")
+ else()
+ message(STATUS "NOTICE: the libpointmatcher library requires the following boost components: thread filesystem system program_options date_time chrono.")
+ endif()
endif()
endif()