diff --git a/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt b/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt index 344a8029ca7..671b9cdfb9d 100644 --- a/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt +++ b/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt @@ -9,15 +9,16 @@ find_package(CGAL REQUIRED) include(CGAL_CreateSingleSourceCGALProgram) find_package(Eigen3 3.1.0 REQUIRED) -if(Eigen3_FOUND) +include(CGAL_Eigen3_support) + +if(TARGET CGAL::Eigen3_support) message(STATUS "Found Eigen") - include(CGAL_Eigen_support) set(targets kinetic_partition) foreach(target ${targets}) create_single_source_cgal_program("${target}.cpp") - target_link_libraries(${target} PUBLIC CGAL::Eigen_support) + target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() else() message(ERROR "This program requires the Eigen library, and will not be compiled.") diff --git a/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt b/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt index 038b9fa4615..8a209b7a8a8 100644 --- a/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt +++ b/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt @@ -5,35 +5,21 @@ cmake_minimum_required(VERSION 3.12...3.29) project(Kinetic_space_partition_Tests) -set(CMAKE_CXX_STANDARD 17) - -find_package(CGAL QUIET COMPONENTS Core) +find_package(CGAL REQUIRED) include(CGAL_CreateSingleSourceCGALProgram) -find_package(Boost REQUIRED) -if(Boost_FOUND) - message(STATUS "Found Boost") +find_package(Eigen3 3.1.0 REQUIRED) +include(CGAL_Eigen3_support) - find_package(Eigen3 3.1.0 REQUIRED) - if(Eigen3_FOUND) - message(STATUS "Found Eigen") - include(CGAL_Eigen_support) +if(TARGET CGAL::Eigen3_support) + message(STATUS "Found Eigen") set(targets kinetic_3d_test_all issue_8624) - set(project_linked_libraries) - set(project_compilation_definitions) - - foreach(target ${targets}) - create_single_source_cgal_program("${target}.cpp") - if(TARGET ${target}) - target_link_libraries(${target} PUBLIC ${project_linked_libraries} CGAL::Eigen_support) - target_compile_definitions(${target} PUBLIC ${project_compilation_definitions}) - endif() - endforeach() - else() - message(ERROR "This program requires the Eigen library, and will not be compiled.") - endif() + foreach(target ${targets}) + create_single_source_cgal_program("${target}.cpp") + target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + endforeach() else() - message(ERROR "This program requires the Boost library, and will not be compiled.") + message(ERROR "This program requires the Eigen library, and will not be compiled.") endif() diff --git a/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt b/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt index 90a1acd129e..8a721f464fb 100644 --- a/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt +++ b/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt @@ -9,15 +9,16 @@ find_package(CGAL REQUIRED) include(CGAL_CreateSingleSourceCGALProgram) find_package(Eigen3 3.1.0 REQUIRED) -if(Eigen3_FOUND) +include(CGAL_Eigen3_support) + +if(TARGET CGAL::Eigen3_support) message(STATUS "Found Eigen") - include(CGAL_Eigen_support) set(targets ksr_basic ksr_building ksr_parameters) foreach(target ${targets}) create_single_source_cgal_program("${target}.cpp") - target_link_libraries(${target} PUBLIC CGAL::Eigen_support) + target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() else() message(ERROR "This program requires the Eigen library, and will not be compiled.") diff --git a/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt b/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt index ada01e60017..9bab32b6721 100644 --- a/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt +++ b/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt @@ -9,15 +9,16 @@ find_package(CGAL REQUIRED) include(CGAL_CreateSingleSourceCGALProgram) find_package(Eigen3 3.1.0 REQUIRED) -if(Eigen3_FOUND) +include(CGAL_Eigen3_support) + +if(TARGET CGAL::Eigen3_support) message(STATUS "Found Eigen") - include(CGAL_Eigen_support) set(targets ksr_test ksr_reorientation ksr_regularization) foreach(target ${targets}) create_single_source_cgal_program("${target}.cpp") - target_link_libraries(${target} PUBLIC CGAL::Eigen_support) + target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() else() message(ERROR "This program requires the Eigen library, and will not be compiled.") diff --git a/Orthtree/examples/Orthtree/CMakeLists.txt b/Orthtree/examples/Orthtree/CMakeLists.txt index 476dfbfb5fc..30a3f4c397f 100644 --- a/Orthtree/examples/Orthtree/CMakeLists.txt +++ b/Orthtree/examples/Orthtree/CMakeLists.txt @@ -19,8 +19,8 @@ create_single_source_cgal_program("octree_surface_mesh.cpp") create_single_source_cgal_program("quadtree_build_manually.cpp") find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) -include(CGAL_Eigen_support) -if (TARGET CGAL::Eigen_support) +include(CGAL_Eigen3_support) +if (TARGET CGAL::Eigen3_support) create_single_source_cgal_program("orthtree_build.cpp") - target_link_libraries(orthtree_build PUBLIC CGAL::Eigen_support) + target_link_libraries(orthtree_build PUBLIC CGAL::Eigen3_support) endif()