diff --git a/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt index fcffb885cd4..295b38ee45b 100644 --- a/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt @@ -14,8 +14,9 @@ create_single_source_cgal_program("benchmark_polygon_16_vertices.cpp") create_single_source_cgal_program("benchmark_polygon_100_vertices.cpp") create_single_source_cgal_program("benchmark_mv_34_vertices.cpp") -find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("benchmark_hm_4_vertices.cpp") target_link_libraries(benchmark_hm_4_vertices PUBLIC CGAL::Eigen3_support) diff --git a/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt index e7d800ca44e..564a3909427 100644 --- a/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt @@ -17,8 +17,9 @@ create_single_source_cgal_program("terrain_height_modeling.cpp") # this code is deprecated: create_single_source_cgal_program("deprecated_coordinates.cpp") -find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("affine_coordinates.cpp") target_link_libraries(affine_coordinates PUBLIC CGAL::Eigen3_support) diff --git a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt index 110315938f9..60fc5e7c04b 100644 --- a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt @@ -42,8 +42,9 @@ create_single_source_cgal_program("test_wp_deprecated_api.cpp") create_single_source_cgal_program("test_mv_deprecated_api.cpp") create_single_source_cgal_program("test_dh_deprecated_api.cpp") -find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("test_hm_unit_square.cpp") target_link_libraries(test_hm_unit_square PUBLIC CGAL::Eigen3_support) diff --git a/Basic_viewer/examples/Basic_viewer/CMakeLists.txt b/Basic_viewer/examples/Basic_viewer/CMakeLists.txt index 14d1847d719..8d543878ee7 100644 --- a/Basic_viewer/examples/Basic_viewer/CMakeLists.txt +++ b/Basic_viewer/examples/Basic_viewer/CMakeLists.txt @@ -11,7 +11,7 @@ project(Basic_viewer_Examples) #CGAL_Qt6 is needed for the drawing. find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) -find_package(Eigen3 3.1.0) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) create_single_source_cgal_program("draw_lcc.cpp") diff --git a/Bounding_volumes/examples/Approximate_min_ellipsoid_d/CMakeLists.txt b/Bounding_volumes/examples/Approximate_min_ellipsoid_d/CMakeLists.txt index aed57e369fc..69334f34a81 100644 --- a/Bounding_volumes/examples/Approximate_min_ellipsoid_d/CMakeLists.txt +++ b/Bounding_volumes/examples/Approximate_min_ellipsoid_d/CMakeLists.txt @@ -4,7 +4,7 @@ project(Approximate_min_ellipsoid_d_Examples) find_package(CGAL REQUIRED) # Use Eigen -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) # create a target per cppfile diff --git a/Bounding_volumes/test/Bounding_volumes/CMakeLists.txt b/Bounding_volumes/test/Bounding_volumes/CMakeLists.txt index a5b3adfd744..514dd344d48 100644 --- a/Bounding_volumes/test/Bounding_volumes/CMakeLists.txt +++ b/Bounding_volumes/test/Bounding_volumes/CMakeLists.txt @@ -7,7 +7,7 @@ project(Bounding_volumes_Tests) find_package(CGAL REQUIRED COMPONENTS Core) # Use Eigen -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) # create a target per cppfile diff --git a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt index 6c942000068..099cad96dae 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt @@ -20,8 +20,9 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") find_package(CGAL REQUIRED COMPONENTS Core) -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index 3e68edb7495..b365271829f 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -23,8 +23,9 @@ if(NOT TARGET CGAL::Boost_iostreams_support) set(Classification_dependencies_met FALSE) endif() -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") set(Classification_dependencies_met FALSE) diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index a50e55a9ecd..0d38263f2df 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -23,8 +23,9 @@ if(NOT TARGET CGAL::Boost_iostreams_support) set(Classification_dependencies_met FALSE) endif() -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") set(Classification_dependencies_met FALSE) diff --git a/Generator/examples/Generator/CMakeLists.txt b/Generator/examples/Generator/CMakeLists.txt index 39e4934705d..bbb2d5796a3 100644 --- a/Generator/examples/Generator/CMakeLists.txt +++ b/Generator/examples/Generator/CMakeLists.txt @@ -28,8 +28,9 @@ create_single_source_cgal_program("random_segments1.cpp") create_single_source_cgal_program("random_segments2.cpp") create_single_source_cgal_program("sphere_d.cpp") -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("random_points_in_tetrahedral_mesh_3.cpp") target_link_libraries(random_points_in_tetrahedral_mesh_3 PRIVATE CGAL::Eigen3_support) diff --git a/Generator/test/Generator/CMakeLists.txt b/Generator/test/Generator/CMakeLists.txt index e7708299971..38539089537 100644 --- a/Generator/test/Generator/CMakeLists.txt +++ b/Generator/test/Generator/CMakeLists.txt @@ -15,8 +15,9 @@ create_single_source_cgal_program("test_tetrahedron_3.cpp") create_single_source_cgal_program("test_triangle_2.cpp") create_single_source_cgal_program("test_triangle_3.cpp") -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("generic_random_test.cpp") target_link_libraries(generic_random_test PRIVATE CGAL::Eigen3_support) diff --git a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt index 42b98ccf55f..45d161dae19 100644 --- a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt +++ b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt @@ -8,7 +8,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) find_package(Qt6 QUIET COMPONENTS Widgets) -find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) diff --git a/GraphicsView/demo/Polygon/CMakeLists.txt b/GraphicsView/demo/Polygon/CMakeLists.txt index e3e4758a1cf..5f5f2599688 100644 --- a/GraphicsView/demo/Polygon/CMakeLists.txt +++ b/GraphicsView/demo/Polygon/CMakeLists.txt @@ -6,8 +6,9 @@ project(Polygon_Demo) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6 Core) -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This demo requires the Eigen library, and will not be compiled.") return() diff --git a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt index 5eeb1961f16..1e1f26ebd5a 100644 --- a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt @@ -7,8 +7,9 @@ project(Heat_method_3_Examples) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.3.0 QUIET) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: These examples require the Eigen library (3.3 or greater), and will not be compiled.") return() diff --git a/Heat_method_3/test/Heat_method_3/CMakeLists.txt b/Heat_method_3/test/Heat_method_3/CMakeLists.txt index 314f023165c..906c22b1fcb 100644 --- a/Heat_method_3/test/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/test/Heat_method_3/CMakeLists.txt @@ -7,8 +7,9 @@ project(Heat_method_3_Tests) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.3.0 QUIET) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: These tests require the Eigen library (3.3 or greater), and will not be compiled.") return() diff --git a/Installation/cmake/modules/CGAL_Eigen3_support.cmake b/Installation/cmake/modules/CGAL_Eigen3_support.cmake index bfcf56c7c2f..3296052dc26 100644 --- a/Installation/cmake/modules/CGAL_Eigen3_support.cmake +++ b/Installation/cmake/modules/CGAL_Eigen3_support.cmake @@ -1,3 +1,10 @@ +if((EIGEN3_FOUND OR Eigen3_FOUND) AND NOT TARGET CGAL::Eigen3_support) + if ("${Eigen3_VERSION}" VERSION_LESS "3.3.7") + set (EIGEN3_FOUND 0) + find_package(Eigen3 3.3.7 QUIET) # (3.3.7 or greater) + endif() +endif() + if((EIGEN3_FOUND OR Eigen3_FOUND) AND NOT TARGET CGAL::Eigen3_support) if(NOT TARGET Threads::Threads) find_package(Threads REQUIRED) diff --git a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt index d28114222f4..3e7424f82f3 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt @@ -7,8 +7,9 @@ project(Jet_fitting_3_Examples) find_package(CGAL REQUIRED) # use Eigen -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) # Link with Boost.ProgramOptions (optional) diff --git a/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt index 5995efe5389..d383ddf8da1 100644 --- a/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt @@ -7,8 +7,9 @@ project(Jet_fitting_3_Tests) find_package(CGAL REQUIRED) # use Eigen -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("blind_1pt.cpp") target_link_libraries(blind_1pt PUBLIC CGAL::Eigen3_support) diff --git a/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt b/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt index 671b9cdfb9d..4d9c5aa9b27 100644 --- a/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt +++ b/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt @@ -8,7 +8,7 @@ project(Kinetic_space_partition_Examples) find_package(CGAL REQUIRED) include(CGAL_CreateSingleSourceCGALProgram) -find_package(Eigen3 3.1.0 REQUIRED) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) diff --git a/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt b/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt index 8a209b7a8a8..44fe49b8212 100644 --- a/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt +++ b/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt @@ -8,7 +8,7 @@ project(Kinetic_space_partition_Tests) find_package(CGAL REQUIRED) include(CGAL_CreateSingleSourceCGALProgram) -find_package(Eigen3 3.1.0 REQUIRED) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) diff --git a/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt b/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt index 8a721f464fb..80fd0b7ab12 100644 --- a/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt +++ b/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt @@ -8,7 +8,7 @@ project(Kinetic_surface_reconstruction_Examples) find_package(CGAL REQUIRED) include(CGAL_CreateSingleSourceCGALProgram) -find_package(Eigen3 3.1.0 REQUIRED) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) diff --git a/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt b/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt index 9bab32b6721..3019fe183c0 100644 --- a/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt +++ b/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt @@ -8,7 +8,7 @@ project(Kinetic_surface_reconstruction_Tests) find_package(CGAL REQUIRED) include(CGAL_CreateSingleSourceCGALProgram) -find_package(Eigen3 3.1.0 REQUIRED) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) diff --git a/Lab/demo/Lab/CMakeLists.txt b/Lab/demo/Lab/CMakeLists.txt index eb2a5dc56b6..eb7765670b0 100644 --- a/Lab/demo/Lab/CMakeLists.txt +++ b/Lab/demo/Lab/CMakeLists.txt @@ -52,12 +52,14 @@ if(Qt6_FOUND) add_definitions(-DSCENE_IMAGE_GL_BUFFERS_AVAILABLE) endif(Qt6_FOUND) -find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) +find_package(Eigen3 QUIET) +include(CGAL_Eigen3_support) + set_package_properties( Eigen3 PROPERTIES DESCRIPTION "A library for linear algebra." PURPOSE "Required for most plugins (Meshing, Mesh and Point Set Processing, etc.).") -include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message(STATUS "NOTICE: Eigen was not found.") endif() diff --git a/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt b/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt index e8d95f4830d..6c849ee74a2 100644 --- a/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt @@ -79,8 +79,9 @@ target_link_libraries( scene_implicit_function_item) # Use Eigen -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) target_link_libraries(mesh_3_optimization_plugin PUBLIC CGAL::Eigen3_support) else() diff --git a/Lab/demo/Lab/Plugins/Surface_mesh_deformation/CMakeLists.txt b/Lab/demo/Lab/Plugins/Surface_mesh_deformation/CMakeLists.txt index 0bf31c74230..31774629100 100644 --- a/Lab/demo/Lab/Plugins/Surface_mesh_deformation/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Surface_mesh_deformation/CMakeLists.txt @@ -1,6 +1,6 @@ include(CGALlab_macros) -if(TARGET CGAL::Eigen3_support AND "${Eigen3_VERSION}" VERSION_GREATER "3.1.90") +if(TARGET CGAL::Eigen3_support) qt6_wrap_ui(editionUI_FILES Deform_mesh.ui) add_item(scene_edit_item diff --git a/Lab/demo/Lab/Plugins/Tetrahedral_remeshing/CMakeLists.txt b/Lab/demo/Lab/Plugins/Tetrahedral_remeshing/CMakeLists.txt index faa1326b956..59dc0c4ed1e 100644 --- a/Lab/demo/Lab/Plugins/Tetrahedral_remeshing/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Tetrahedral_remeshing/CMakeLists.txt @@ -14,7 +14,7 @@ cgal_lab_plugin( target_link_libraries(tetrahedral_remeshing_plugin PUBLIC scene_c3t3_item ${OPENGL_gl_LIBRARY}) -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) target_link_libraries(tetrahedral_remeshing_plugin PUBLIC CGAL::Eigen3_support) diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index f259e406cc4..b4e34b0fd40 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -19,8 +19,9 @@ if(CGAL_ACTIVATE_CONCURRENT_MESH_3 OR "$ENV{CGAL_ACTIVATE_CONCURRENT_MESH_3}") endif() # Use Eigen -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: All examples require the Eigen3 library, and will not be compiled.") return() diff --git a/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index 3deb1f35b66..13cae3a46d2 100644 --- a/Mesh_3/test/Mesh_3/CMakeLists.txt +++ b/Mesh_3/test/Mesh_3/CMakeLists.txt @@ -7,8 +7,9 @@ project( Mesh_3_Tests ) find_package(CGAL REQUIRED COMPONENTS ImageIO) # Use Eigen -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if (NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() diff --git a/NewKernel_d/test/NewKernel_d/CMakeLists.txt b/NewKernel_d/test/NewKernel_d/CMakeLists.txt index ac92d09a3a0..43592bd2319 100644 --- a/NewKernel_d/test/NewKernel_d/CMakeLists.txt +++ b/NewKernel_d/test/NewKernel_d/CMakeLists.txt @@ -14,6 +14,7 @@ find_package(CGAL REQUIRED) find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) file( GLOB cppfiles diff --git a/Number_types/test/Number_types/CMakeLists.txt b/Number_types/test/Number_types/CMakeLists.txt index 339285db0d7..112be29170b 100644 --- a/Number_types/test/Number_types/CMakeLists.txt +++ b/Number_types/test/Number_types/CMakeLists.txt @@ -80,8 +80,10 @@ if(NOT CGAL_DISABLE_GMP) create_single_source_cgal_program( "Gmpfi.cpp" ) create_single_source_cgal_program( "Gmpfr_bug.cpp" ) create_single_source_cgal_program( "test_eigen.cpp" ) - find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) + + find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if (TARGET CGAL::Eigen3_support) target_link_libraries(test_eigen PUBLIC CGAL::Eigen3_support) endif() diff --git a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt index 24d8eccb2a2..0920c407f48 100644 --- a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt @@ -7,8 +7,9 @@ project(Optimal_bounding_box_Benchmark) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() diff --git a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt index 8fc0f22e1e5..26a0bb4caef 100644 --- a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt @@ -6,8 +6,9 @@ project(Optimal_bounding_box_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() diff --git a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt index 2c11f89fac1..234b679f14f 100644 --- a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt @@ -6,8 +6,9 @@ project(Optimal_bounding_box_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() diff --git a/Orthtree/examples/Orthtree/CMakeLists.txt b/Orthtree/examples/Orthtree/CMakeLists.txt index 30a3f4c397f..9c21a55ce9f 100644 --- a/Orthtree/examples/Orthtree/CMakeLists.txt +++ b/Orthtree/examples/Orthtree/CMakeLists.txt @@ -18,8 +18,9 @@ create_single_source_cgal_program("quadtree_build_from_point_vector.cpp") 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) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if (TARGET CGAL::Eigen3_support) create_single_source_cgal_program("orthtree_build.cpp") target_link_libraries(orthtree_build PUBLIC CGAL::Eigen3_support) diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt index 4433ae373dc..6f86335f44a 100644 --- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt @@ -8,8 +8,9 @@ project(Periodic_3_mesh_3_Examples) find_package(CGAL REQUIRED) # Use Eigen -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() diff --git a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt index 1fb0f56e396..d33ac9d811a 100644 --- a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt @@ -7,8 +7,9 @@ project(Periodic_3_mesh_3_Tests) find_package(CGAL REQUIRED COMPONENTS ImageIO) # Use Eigen -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() diff --git a/Point_set_3/examples/Point_set_3/CMakeLists.txt b/Point_set_3/examples/Point_set_3/CMakeLists.txt index 95a6169ec51..b816a26e3b2 100644 --- a/Point_set_3/examples/Point_set_3/CMakeLists.txt +++ b/Point_set_3/examples/Point_set_3/CMakeLists.txt @@ -13,8 +13,9 @@ create_single_source_cgal_program("point_set_read_xyz.cpp") create_single_source_cgal_program("point_set_advanced.cpp") create_single_source_cgal_program("point_set_read_ply.cpp") -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("point_set_algo.cpp") target_link_libraries(point_set_algo PUBLIC CGAL::Eigen3_support) 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 fbe76511b44..c72ff235dea 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 @@ -67,8 +67,9 @@ else() endif() # Use Eigen -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) # Executables that require Eigen diff --git a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt index a15b69cad1a..4bfdc81008f 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt @@ -47,8 +47,9 @@ else() endif() # Use Eigen -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) # Executables that require Eigen create_single_source_cgal_program( "normal_estimation_test.cpp" ) diff --git a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt index 3c8bc894297..6e6e74a56b2 100644 --- a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt +++ b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt @@ -21,9 +21,10 @@ endif() # Activate Parallelism in Mesh_3 option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate parallelism in Mesh_3" OFF) -# Find Eigen3 (requires 3.1.0 or greater) -find_package(Eigen3 3.1.0 QUIET) +# Find Eigen3 +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) # Executables that require Eigen 3 create_single_source_cgal_program("poisson_reconstruction_example.cpp") diff --git a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt index 38eedcb7bb5..7265854bef3 100644 --- a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt +++ b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt @@ -18,7 +18,7 @@ if(MSVC) message(STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'") endif() -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) # Executables that require Eigen 3.1 diff --git a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt index 2a75ff4b830..d5189072686 100644 --- a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt @@ -7,8 +7,9 @@ project(Polygon_mesh_processing) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: Benchmarks require Eigen 3.2 (or greater), and will not be compiled") return() diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt index b0958a8ff4f..70cc7959b18 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt @@ -59,8 +59,9 @@ create_single_source_cgal_program("isotropic_remeshing_with_allow_move.cpp") create_single_source_cgal_program("triangle_mesh_autorefinement.cpp") create_single_source_cgal_program("soup_autorefinement.cpp") -find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("hole_filling_example.cpp") target_link_libraries(hole_filling_example PUBLIC CGAL::Eigen3_support) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index fb8af04d26c..165451d56ad 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -73,8 +73,9 @@ create_single_source_cgal_program("issue_8730.cpp") create_single_source_cgal_program("issue_7164.cpp") # create_single_source_cgal_program("test_pmp_repair_self_intersections.cpp") -find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("fairing_test.cpp") target_link_libraries(fairing_test PUBLIC CGAL::Eigen3_support) diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt index 77915e0f009..b9b4dec42ac 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt @@ -8,8 +8,9 @@ project(Polygonal_surface_reconstruction_Examples) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() diff --git a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt index a47b82f430d..5a495850aa0 100644 --- a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt @@ -8,8 +8,9 @@ project(Polygonal_surface_reconstruction_Tests) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() diff --git a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt index 9f3d7cbefb7..973b6810163 100644 --- a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt @@ -8,8 +8,9 @@ include_directories(./) # Find CGAL and CGAL Qt6 find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() diff --git a/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt index 924a2b07a37..4adb4e084d6 100644 --- a/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt @@ -7,8 +7,9 @@ project(Principal_component_analysis_Examples) find_package(CGAL REQUIRED) # Use Eigen -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() diff --git a/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt index b61fbc8b755..362e00ba890 100644 --- a/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt @@ -7,8 +7,9 @@ project(Principal_component_analysis_Tests) find_package(CGAL REQUIRED) # Use Eigen -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() diff --git a/Property_map/examples/Property_map/CMakeLists.txt b/Property_map/examples/Property_map/CMakeLists.txt index 7a890baba13..1807beab3a3 100644 --- a/Property_map/examples/Property_map/CMakeLists.txt +++ b/Property_map/examples/Property_map/CMakeLists.txt @@ -6,8 +6,9 @@ find_package(CGAL REQUIRED) create_single_source_cgal_program("dynamic_properties.cpp") -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("custom_property_map.cpp") target_link_libraries(custom_property_map PUBLIC CGAL::Eigen3_support) diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index 7c9dac3523f..afafe670927 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -4,8 +4,9 @@ project(Ridges_3_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) # Link with Boost.ProgramOptions (optional) diff --git a/Ridges_3/test/Ridges_3/CMakeLists.txt b/Ridges_3/test/Ridges_3/CMakeLists.txt index 5fe941c248b..78005e515bf 100644 --- a/Ridges_3/test/Ridges_3/CMakeLists.txt +++ b/Ridges_3/test/Ridges_3/CMakeLists.txt @@ -6,8 +6,9 @@ project(Ridges_3_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("ridge_test.cpp") target_link_libraries(ridge_test PUBLIC CGAL::Eigen3_support) diff --git a/SMDS_3/test/SMDS_3/CMakeLists.txt b/SMDS_3/test/SMDS_3/CMakeLists.txt index 51c10f60a4e..c19c19f5d5e 100644 --- a/SMDS_3/test/SMDS_3/CMakeLists.txt +++ b/SMDS_3/test/SMDS_3/CMakeLists.txt @@ -9,8 +9,9 @@ find_package(CGAL REQUIRED) create_single_source_cgal_program( "test_simplicial_cb_vb.cpp") create_single_source_cgal_program( "test_tet_soup_to_c3t3.cpp") -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program( "test_c3t3.cpp" ) create_single_source_cgal_program( "test_c3t3_io.cpp" ) diff --git a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt index 02feca0ab2c..e446021c33b 100644 --- a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt +++ b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt @@ -14,8 +14,9 @@ if(ACTIVATE_CONCURRENCY) endif() endif() -find_package(Eigen3 3.1.0 QUIET) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("scale_space.cpp") target_link_libraries(scale_space PUBLIC CGAL::Eigen3_support) diff --git a/Shape_detection/benchmark/Shape_detection/CMakeLists.txt b/Shape_detection/benchmark/Shape_detection/CMakeLists.txt index 77e9dc7684f..8fa3c1c7305 100644 --- a/Shape_detection/benchmark/Shape_detection/CMakeLists.txt +++ b/Shape_detection/benchmark/Shape_detection/CMakeLists.txt @@ -6,8 +6,9 @@ project(Shape_detection_Benchmarks) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("benchmark_region_growing_on_point_set_2.cpp") target_link_libraries(benchmark_region_growing_on_point_set_2 PUBLIC CGAL::Eigen3_support) diff --git a/Shape_detection/examples/Shape_detection/CMakeLists.txt b/Shape_detection/examples/Shape_detection/CMakeLists.txt index 4a2cbea8183..4bd527f6f13 100644 --- a/Shape_detection/examples/Shape_detection/CMakeLists.txt +++ b/Shape_detection/examples/Shape_detection/CMakeLists.txt @@ -10,8 +10,9 @@ create_single_source_cgal_program("efficient_RANSAC_with_custom_shape.cpp") create_single_source_cgal_program("efficient_RANSAC_with_parameters.cpp") create_single_source_cgal_program("efficient_RANSAC_with_point_access.cpp") -find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) message(STATUS "Found Eigen 3") diff --git a/Shape_detection/test/Shape_detection/CMakeLists.txt b/Shape_detection/test/Shape_detection/CMakeLists.txt index 35abd070d58..2b38e8c3bde 100644 --- a/Shape_detection/test/Shape_detection/CMakeLists.txt +++ b/Shape_detection/test/Shape_detection/CMakeLists.txt @@ -18,10 +18,10 @@ create_single_source_cgal_program("test_efficient_RANSAC_torus_connected_compone create_single_source_cgal_program("test_efficient_RANSAC_torus_parameters.cpp") create_single_source_cgal_program("test_efficient_RANSAC_scene.cpp") -find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) -if(TARGET CGAL::Eigen3_support) +if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("test_region_growing_basic.cpp") create_single_source_cgal_program("test_region_growing_strict.cpp") create_single_source_cgal_program("test_region_growing_on_cube.cpp") diff --git a/Shape_regularization/examples/Shape_regularization/CMakeLists.txt b/Shape_regularization/examples/Shape_regularization/CMakeLists.txt index 5e9bf84f85f..81a8a5c83b0 100644 --- a/Shape_regularization/examples/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/examples/Shape_regularization/CMakeLists.txt @@ -27,8 +27,9 @@ if(TARGET CGAL::OSQP_support) endforeach() # Use Eigen. - find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) + find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) message(STATUS "Found Eigen") diff --git a/Solver_interface/examples/Solver_interface/CMakeLists.txt b/Solver_interface/examples/Solver_interface/CMakeLists.txt index 10fc026e719..63198fd6dc1 100644 --- a/Solver_interface/examples/Solver_interface/CMakeLists.txt +++ b/Solver_interface/examples/Solver_interface/CMakeLists.txt @@ -7,8 +7,9 @@ project(Solver_interface_Examples) find_package(CGAL REQUIRED) # Use Eigen -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("singular_value_decomposition.cpp") target_link_libraries(singular_value_decomposition PUBLIC CGAL::Eigen3_support) diff --git a/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt b/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt index 4aaf189118f..c65c5078840 100644 --- a/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt @@ -8,8 +8,9 @@ find_package(CGAL REQUIRED COMPONENTS Core) include_directories(BEFORE "include") -find_package(Eigen3 3.1.91 QUIET) # (requires 3.1.91 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: These benchmarks require Eigen 3.1.91 (or greater), and will not be compiled.") return() diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt index 8fbb2c2bfc5..a7616f54817 100644 --- a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -26,8 +26,9 @@ create_single_source_cgal_program("weighted_Minkowski_distance.cpp") create_single_source_cgal_program("searching_sphere_orthogonally.cpp") create_single_source_cgal_program("splitter_worst_cases.cpp") -find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("fuzzy_range_query.cpp") target_link_libraries(fuzzy_range_query PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt index 35110d182d2..2c51a78c7e2 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt @@ -8,8 +8,9 @@ project(Surface_mesh_approximation_Examples) find_package(CGAL REQUIRED) # Use Eigen (for PCA) -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt index aefc4da29fa..11fdfe7ef4e 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt @@ -8,8 +8,9 @@ project(Surface_mesh_approximation_Tests) find_package(CGAL REQUIRED) # Use Eigen (for PCA) -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() diff --git a/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt b/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt index e76761f9787..1fb20d9e41b 100644 --- a/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt +++ b/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt @@ -3,8 +3,9 @@ project(benchmark_for_closest_rotation) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("benchmark_for_concept_models.cpp") target_link_libraries(benchmark_for_concept_models PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt index 98b5dc3c61f..4146f53b925 100644 --- a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt @@ -8,8 +8,9 @@ set_property(DIRECTORY PROPERTY CGAL_NO_TESTING TRUE) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("deform_mesh_for_botsch08_format.cpp") target_link_libraries(deform_mesh_for_botsch08_format PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt index b6013ffce75..81883e35d4b 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt @@ -6,8 +6,9 @@ project(Surface_mesh_deformation_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("all_roi_assign_example.cpp") create_single_source_cgal_program("all_roi_assign_example_custom_polyhedron.cpp") diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt index e8819b7a22b..1ecb5aa4955 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt @@ -6,8 +6,9 @@ project(Surface_mesh_deformation_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("Cactus_deformation_session.cpp") target_link_libraries(Cactus_deformation_session PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt index d7ad05d47b0..a8c8e005cbd 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt @@ -5,8 +5,9 @@ project(Surface_mesh_parameterization_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) # Executables that require Eigen 3.1 diff --git a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt index 885af839aeb..d811d78c243 100644 --- a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt @@ -14,8 +14,9 @@ else() message(STATUS "NOTICE: Examples will be compiled without the SuiteSparse library and UmfPack. Try setting CMAKE_PREFIX_PATH to your SuiteSparse installation.") endif() -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("extensive_parameterization_test.cpp") target_link_libraries(extensive_parameterization_test PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt index 0f63efb7b06..fddd7be4bbe 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt @@ -19,8 +19,9 @@ create_single_source_cgal_program("edge_collapse_all_short_edges.cpp") create_single_source_cgal_program("edge_collapse_bounded_normal_change.cpp") create_single_source_cgal_program("edge_collapse_visitor_surface_mesh.cpp") -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("edge_collapse_garland_heckbert.cpp") target_link_libraries(edge_collapse_garland_heckbert PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/test/Surface_mesh_simplification/CMakeLists.txt index cd3cee59729..09a6463cf9f 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/CMakeLists.txt @@ -14,8 +14,9 @@ create_single_source_cgal_program("test_edge_profile_link.cpp") create_single_source_cgal_program("test_edge_deprecated_stop_predicates.cpp") create_single_source_cgal_program("test_edge_collapse_stability.cpp") -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("edge_collapse_garland_heckbert_variations.cpp") target_link_libraries(edge_collapse_garland_heckbert_variations PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt index 21b285a0b97..d57e7363d1f 100644 --- a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt @@ -7,8 +7,9 @@ project(Mean_curvature_skeleton) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("solver_benchmark.cpp") target_link_libraries(solver_benchmark PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt index 9b86386660b..9b1a4d70e80 100644 --- a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt @@ -6,8 +6,9 @@ project(Surface_mesh_skeletonization_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("simple_mcfskel_example.cpp") create_single_source_cgal_program("simple_mcfskel_sm_example.cpp") diff --git a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt index 86bc2ec1328..f6ca384321e 100644 --- a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt @@ -6,8 +6,9 @@ project(Surface_mesh_skeletonization_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("MCF_Skeleton_test.cpp") target_link_libraries(MCF_Skeleton_test PUBLIC CGAL::Eigen3_support) diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt index 4a1e6db6cc7..c1bade1ad8c 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt @@ -25,8 +25,9 @@ else() endif() # Use Eigen for Mesh_3 -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program( "mesh_and_remesh_polyhedral_domain_with_features.cpp" ) target_link_libraries(mesh_and_remesh_polyhedral_domain_with_features PUBLIC CGAL::Eigen3_support) diff --git a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt index 37afbe1c7a5..4c7858ea5ee 100644 --- a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt @@ -27,8 +27,9 @@ cgal_add_test(test_tetrahedral_remeshing_mls) # Tests using Mesh_3 require Eigen -find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("test_mesh_and_remesh_polyhedron_with_features.cpp") target_link_libraries(test_mesh_and_remesh_polyhedron_with_features PUBLIC CGAL::Eigen3_support) diff --git a/Triangulation/applications/Triangulation/CMakeLists.txt b/Triangulation/applications/Triangulation/CMakeLists.txt index 034a38fa697..1fc87bbade2 100644 --- a/Triangulation/applications/Triangulation/CMakeLists.txt +++ b/Triangulation/applications/Triangulation/CMakeLists.txt @@ -7,8 +7,9 @@ project(Triangulation_apps) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0 QUIET) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: Applications require Eigen 3.1 (or greater), and will not be compiled") return() diff --git a/Triangulation/benchmark/Triangulation/CMakeLists.txt b/Triangulation/benchmark/Triangulation/CMakeLists.txt index 9737bcc99c6..aa694759587 100644 --- a/Triangulation/benchmark/Triangulation/CMakeLists.txt +++ b/Triangulation/benchmark/Triangulation/CMakeLists.txt @@ -6,8 +6,9 @@ project(Triangulation_benchmark) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(Eigen3 3.1.0 QUIET) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) include_directories(BEFORE "include") diff --git a/Triangulation/examples/Triangulation/CMakeLists.txt b/Triangulation/examples/Triangulation/CMakeLists.txt index bf1fcf87fb3..8d9cd026008 100644 --- a/Triangulation/examples/Triangulation/CMakeLists.txt +++ b/Triangulation/examples/Triangulation/CMakeLists.txt @@ -11,8 +11,9 @@ endif() find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0 QUIET) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("barycentric_subdivision.cpp") create_single_source_cgal_program("delaunay_triangulation.cpp") diff --git a/Triangulation/test/Triangulation/CMakeLists.txt b/Triangulation/test/Triangulation/CMakeLists.txt index 03a5deff165..5c3248abde4 100644 --- a/Triangulation/test/Triangulation/CMakeLists.txt +++ b/Triangulation/test/Triangulation/CMakeLists.txt @@ -11,8 +11,9 @@ endif() find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0 QUIET) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) include_directories(BEFORE "include") diff --git a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt index 076adb04ea7..a24eaf80dd4 100644 --- a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt @@ -18,7 +18,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) # Find Qt6 itself find_package(Qt6 QUIET COMPONENTS Widgets OpenGL) -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) if(CGAL_Qt6_FOUND AND Qt6_FOUND AND TARGET CGAL::Eigen3_support) diff --git a/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt index 79beea09c1e..35091f0b43a 100644 --- a/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt @@ -18,8 +18,9 @@ else() message("NOTICE: Some tests require CGAL_Core (or LEDA), and will not be compiled.") endif() -find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program( "test_dtos_dual.cpp" ) target_link_libraries(test_dtos_dual PUBLIC CGAL::Eigen3_support) diff --git a/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt b/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt index 1675ac21334..3f447b5d69e 100644 --- a/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt +++ b/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt @@ -12,8 +12,9 @@ create_single_source_cgal_program("vda_pt.cpp") create_single_source_cgal_program("vda_rt.cpp") create_single_source_cgal_program("vda_sdg.cpp") -find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("vda_tos2.cpp") target_link_libraries(vda_tos2 PUBLIC CGAL::Eigen3_support) diff --git a/Weights/examples/Weights/CMakeLists.txt b/Weights/examples/Weights/CMakeLists.txt index d8218de5381..7f4a6ad171f 100644 --- a/Weights/examples/Weights/CMakeLists.txt +++ b/Weights/examples/Weights/CMakeLists.txt @@ -11,8 +11,9 @@ create_single_source_cgal_program("projection_traits.cpp") create_single_source_cgal_program("custom_traits.cpp") create_single_source_cgal_program("convergence.cpp") -find_package(Eigen3 3.1.0 QUIET) # (requires 3.1.0 or greater) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) + if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("weighted_laplacian.cpp") target_link_libraries(weighted_laplacian PUBLIC CGAL::Eigen3_support)