CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.84k stars 1.37k forks source link

Use pointmatcher with CGAL fail #8116

Closed linbeijianbaoxia closed 5 months ago

linbeijianbaoxia commented 5 months ago

I tried to run the PointMatcher example program from CGAL's Point Set Processing: https://doc.cgal.org/latest/Point_set_processing_3/index.html#Point_set_processing_3Examples_registration_PointMatcher. I have successfully installed libpointmatcher, version 1.3.1. When I tried to compile the example project using CMake, find_package(libpointmatcher QUIET) also successfully found my libpointmatcher library, but it seems that if(TARGET CGAL::pointmatcher_support) did not pass, resulting in the corresponding project not being compiled. This has confused me about where the problem lies. Below is the information output during CMake compilation:

Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19045.
Visual Leak Detector (VLD) is not found.
Using header-only CGAL
Targeting Visual Studio 16 2019
Target build environment supports auto-linking
Using VC toolset 142.
Generator uses intermediate configuration directory: $(Configuration)
Boost include dirs: C:/dev/vcpkg/installed/x64-windows/include
Boost libraries:    
USING DEBUG CXXFLAGS   = '/DWIN32 /D_WINDOWS /GR /EHsc /Zi /Ob0 /Od /RTC1'
USING DEBUG EXEFLAGS   = '/machine:x64 /debug /INCREMENTAL'
USING RELEASE CXXFLAGS = '/DWIN32 /D_WINDOWS /GR /EHsc /O2 /Ob2 /DNDEBUG'
USING RELEASE EXEFLAGS = '/machine:x64 /INCREMENTAL:NO'
NOTICE: the LAS reader example requires LASlib and will not be compiled.
CMake Warning at D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1204 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1326 (_Boost_COMPONENT_DEPENDENCIES)
  D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1935 (_Boost_MISSING_DEPENDENCIES)
  C:/dev/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:813 (include)
  C:/dev/vcpkg/installed/x64-windows/share/cgal/CGAL_pointmatcher_support.cmake:2 (find_package)
  CMakeLists.txt:96 (include)

CMake Warning at D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1204 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1326 (_Boost_COMPONENT_DEPENDENCIES)
  D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1935 (_Boost_MISSING_DEPENDENCIES)
  C:/dev/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:813 (include)
  C:/dev/vcpkg/installed/x64-windows/share/cgal/CGAL_pointmatcher_support.cmake:2 (find_package)
  CMakeLists.txt:96 (include)

CMake Warning at D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1204 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1326 (_Boost_COMPONENT_DEPENDENCIES)
  D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1935 (_Boost_MISSING_DEPENDENCIES)
  C:/dev/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:813 (include)
  C:/dev/vcpkg/installed/x64-windows/share/cgal/CGAL_pointmatcher_support.cmake:2 (find_package)
  CMakeLists.txt:96 (include)

CMake Warning at D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1204 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1326 (_Boost_COMPONENT_DEPENDENCIES)
  D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1935 (_Boost_MISSING_DEPENDENCIES)
  C:/dev/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:813 (include)
  C:/dev/vcpkg/installed/x64-windows/share/cgal/CGAL_pointmatcher_support.cmake:2 (find_package)
  CMakeLists.txt:96 (include)

CMake Warning at D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1204 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1326 (_Boost_COMPONENT_DEPENDENCIES)
  D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1935 (_Boost_MISSING_DEPENDENCIES)
  C:/dev/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:813 (include)
  C:/dev/vcpkg/installed/x64-windows/share/cgal/CGAL_pointmatcher_support.cmake:2 (find_package)
  CMakeLists.txt:96 (include)

CMake Warning at D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1204 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1326 (_Boost_COMPONENT_DEPENDENCIES)
  D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1935 (_Boost_MISSING_DEPENDENCIES)
  C:/dev/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:813 (include)
  C:/dev/vcpkg/installed/x64-windows/share/cgal/CGAL_pointmatcher_support.cmake:2 (find_package)
  CMakeLists.txt:96 (include)

CMake Warning at D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1204 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1326 (_Boost_COMPONENT_DEPENDENCIES)
  D:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1935 (_Boost_MISSING_DEPENDENCIES)
  C:/dev/vcpkg/installed/x64-windows/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:813 (include)
  C:/dev/vcpkg/installed/x64-windows/share/cgal/CGAL_pointmatcher_support.cmake:2 (find_package)
  CMakeLists.txt:96 (include)

Could NOT find Boost (missing: program_options) (found version "1.83.0")
NOTICE: the libpointmatcher library requires the following boost components: thread filesystem system program_options date_time chrono.
NOTICE: registration with pointmatcher requires libpointmatcher and will not be compiled.
NOTICE: registration with OpenGR and pointmatcher requires both libpointmatcher and OpenGR, and will not be compiled.
Configuring done

I'm not sure if it's related to the Boost version, as my CGAL was installed directly using vcpkg. image

Environment

lrineau commented 5 months ago

C:/dev/vcpkg/installed/x64-windows/share/cgal/CGAL_pointmatcher_support.cmake searchs for dependencies of libpointmatcher. And we see in your log that it displays:

NOTICE: the libpointmatcher library requires the following boost components: thread filesystem system program_options date_time chrono.

Part of Boost libraries are not found correctly.

linbeijianbaoxia commented 5 months ago

@lrineau Thank you very much for your suggestion, I will give it a try.