Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

project(Barycentric_coordinates_2_Benchmarks)

cmake_minimum_required(VERSION 3.12...3.31)
cmake_minimum_required(VERSION 3.12)

find_package(CGAL REQUIRED COMPONENTS Core)

Expand All @@ -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)

Comment on lines +17 to +19
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this find be included in the include file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right. That would make it shorter. However, for now, all those internal support files follow the same scheme of having the find_package outside..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistency is a great thing so having all packages handled similar is the best, though I think that all packages should have the find inside so that maintenance will be easier as well.

if(TARGET CGAL::Eigen3_support)
create_single_source_cgal_program("benchmark_hm_4_vertices.cpp")
target_link_libraries(benchmark_hm_4_vertices PRIVATE CGAL::Eigen3_support)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 PRIVATE CGAL::Eigen3_support)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 PRIVATE CGAL::Eigen3_support)
Expand Down
2 changes: 1 addition & 1 deletion Basic_viewer/examples/Basic_viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Bounding_volumes/test/Bounding_volumes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion Classification/examples/Classification/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion Classification/test/Classification/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Frechet_distance/examples/Frechet_distance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ project( Frechet_distance_Examples )
find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core )


find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater)
find_package(Eigen3 QUIET)
include(CGAL_Eigen3_support)

create_single_source_cgal_program( "Frechet_distance_2.cpp" )
Expand Down
3 changes: 2 additions & 1 deletion Frechet_distance/test/Frechet_distance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ project( Frechet_distance_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(TARGET CGAL::Eigen3_support)
create_single_source_cgal_program( "Frechet_distance_test.cpp" )
target_link_libraries(Frechet_distance_test PRIVATE CGAL::Eigen3_support)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ project( classical_Frechet_distance )

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)

create_single_source_cgal_program("Compute_classical_Frechet_distance_3.cpp")
Expand Down
3 changes: 2 additions & 1 deletion Generator/examples/Generator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion Generator/test/Generator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion GraphicsView/demo/Bounding_volumes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion GraphicsView/demo/Polygon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion Heat_method_3/examples/Heat_method_3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion Heat_method_3/test/Heat_method_3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 7 additions & 0 deletions Installation/cmake/modules/CGAL_Eigen3_support.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Isosurfacing_3/benchmark/Isosurfacing_3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ project( Isosurfacing_3_benchmark )

find_package(CGAL REQUIRED)

find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
find_package(Eigen3 QUIET)
include(CGAL_Eigen3_support)

find_package(TBB)
Expand Down
2 changes: 1 addition & 1 deletion Isosurfacing_3/examples/Isosurfacing_3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ project( Isosurfacing_3_Examples )

find_package(CGAL REQUIRED COMPONENTS ImageIO)

find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
find_package(Eigen3 QUIET)
include(CGAL_Eigen3_support)

find_package(TBB QUIET)
Expand Down
2 changes: 1 addition & 1 deletion Isosurfacing_3/test/Isosurfacing_3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project(Isosurfacing_3_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)

find_package(TBB QUIET)
Expand Down
3 changes: 2 additions & 1 deletion Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 PRIVATE CGAL::Eigen3_support)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

set(targets kinetic_3d_test_all issue_8624)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions Lab/demo/Lab/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ if(Qt6_FOUND)
add_compile_definitions(QT_NO_KEYWORDS)
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()
Expand Down
3 changes: 2 additions & 1 deletion Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ target_link_libraries(
CGAL_Lab_target_use_c3t3_type(mesh_3_optimization_plugin)

# 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 PRIVATE CGAL::Eigen3_support)
else()
Expand Down
Loading
Loading