From a76ab58c30f0dbcbaa884b7048f14442d0cce34f Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Mon, 9 Sep 2024 16:26:17 +0200 Subject: [PATCH 1/2] OpenGR does not work with msvc2015 --- .../Point_set_processing_3/CMakeLists.txt | 55 ++++++++++--------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt index de0b1a23693..9824e5bb47f 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt @@ -120,33 +120,38 @@ if(TARGET CGAL::Eigen3_support) ) endif() # Executables that require OpenGR - find_package(OpenGR QUIET) - include(CGAL_OpenGR_support) - if(TARGET CGAL::OpenGR_support) - create_single_source_cgal_program("registration_with_OpenGR.cpp") - target_link_libraries(registration_with_OpenGR PRIVATE ${CGAL_libs} - CGAL::OpenGR_support) + if (NOT MSVC_VERSION OR MSVC_VERSION GREATER_EQUAL 1910) + find_package(OpenGR QUIET) + include(CGAL_OpenGR_support) + if(TARGET CGAL::OpenGR_support) + create_single_source_cgal_program("registration_with_OpenGR.cpp") + target_link_libraries(registration_with_OpenGR PRIVATE ${CGAL_libs} + CGAL::OpenGR_support) + else() + message( + STATUS + "NOTICE : registration_with_OpenGR requires OpenGR, and will not be compiled." + ) + endif() + # Executables that require both libpointmatcher and OpenGR + if (TARGET CGAL::pointmatcher_support AND + TARGET CGAL::OpenGR_support) + create_single_source_cgal_program("registration_with_opengr_pointmatcher_pipeline.cpp") + target_link_libraries( + registration_with_opengr_pointmatcher_pipeline PRIVATE ${CGAL_libs} + CGAL::pointmatcher_support CGAL::OpenGR_support) + else() + message( + STATUS + "NOTICE : registration_with_opengr_pointmatcher_pipeline requires libpointmatcher and OpenGR, and will not be compiled." + ) + endif() else() - message( - STATUS - "NOTICE : registration_with_OpenGR requires OpenGR, and will not be compiled." - ) + message( + STATUS + "NOTICE : your compiler does not support OpenGR, registration_with_OpenGR will not be compiled." + ) endif() - - # Executables that require both libpointmatcher and OpenGR - if (TARGET CGAL::pointmatcher_support AND - TARGET CGAL::OpenGR_support) - create_single_source_cgal_program("registration_with_opengr_pointmatcher_pipeline.cpp") - target_link_libraries( - registration_with_opengr_pointmatcher_pipeline PRIVATE ${CGAL_libs} - CGAL::pointmatcher_support CGAL::OpenGR_support) - else() - message( - STATUS - "NOTICE : registration_with_opengr_pointmatcher_pipeline requires libpointmatcher and OpenGR, and will not be compiled." - ) - endif() - else() message( STATUS From cc7ba6ef9810b8c8de007ca23fd3d260ccb6c71c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 9 Sep 2024 17:10:23 +0200 Subject: [PATCH 2/2] also disable OpenGR with MSVC2015 in CGALlab --- .../examples/Point_set_processing_3/CMakeLists.txt | 4 ++-- .../demo/Polyhedron/Plugins/Point_set/CMakeLists.txt | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt index 9824e5bb47f..7bb1ede702b 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt @@ -145,11 +145,11 @@ if(TARGET CGAL::Eigen3_support) STATUS "NOTICE : registration_with_opengr_pointmatcher_pipeline requires libpointmatcher and OpenGR, and will not be compiled." ) - endif() + endif() else() message( STATUS - "NOTICE : your compiler does not support OpenGR, registration_with_OpenGR will not be compiled." + "NOTICE : OpenGR does not support your compiler, registration_with_OpenGR will not be compiled." ) endif() else() diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt index 0c562c8a6f2..c99b9fa1eeb 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt @@ -97,9 +97,15 @@ if(TARGET CGAL::Eigen3_support) point_set_shape_detection_plugin PUBLIC scene_surface_mesh_item scene_points_with_normal_item scene_polygon_soup_item scene_callback_signaler CGAL::Eigen3_support) - - find_package(OpenGR QUIET) - include(CGAL_OpenGR_support) + if (NOT MSVC_VERSION OR MSVC_VERSION GREATER_EQUAL 1910) + find_package(OpenGR QUIET) + include(CGAL_OpenGR_support) + else() + message( + STATUS + "NOTICE : OpenGR does not support your compiler." + ) + endif() find_package(libpointmatcher QUIET) include(CGAL_pointmatcher_support)