diff --git a/Bounding_volumes/examples/Approximate_min_ellipsoid_d/CMakeLists.txt b/Bounding_volumes/examples/Approximate_min_ellipsoid_d/CMakeLists.txt index 90f3a7f6622..00764d546fc 100644 --- a/Bounding_volumes/examples/Approximate_min_ellipsoid_d/CMakeLists.txt +++ b/Bounding_volumes/examples/Approximate_min_ellipsoid_d/CMakeLists.txt @@ -12,10 +12,18 @@ if ( CGAL_FOUND ) include_directories (BEFORE "../../include") + # Use Eigen + find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) + if (EIGEN3_FOUND) + include( ${EIGEN3_USE_FILE} ) + endif() + # create a target per cppfile file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) foreach(cppfile ${cppfiles}) - create_single_source_cgal_program( "${cppfile}" ) + if(NOT (${cppfile} STREQUAL "ellipsoid.cpp") OR EIGEN3_FOUND) + create_single_source_cgal_program( "${cppfile}" ) + endif() endforeach() else() diff --git a/Bounding_volumes/test/Bounding_volumes/CMakeLists.txt b/Bounding_volumes/test/Bounding_volumes/CMakeLists.txt index da560c664e8..30daac07fc0 100644 --- a/Bounding_volumes/test/Bounding_volumes/CMakeLists.txt +++ b/Bounding_volumes/test/Bounding_volumes/CMakeLists.txt @@ -16,10 +16,18 @@ if ( CGAL_FOUND ) include_directories (BEFORE "../../include") + # Use Eigen + find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) + if (EIGEN3_FOUND) + include( ${EIGEN3_USE_FILE} ) + endif() + # create a target per cppfile file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) foreach(cppfile ${cppfiles}) - create_single_source_cgal_program( "${cppfile}" ) + if(NOT (${cppfile} STREQUAL "Approximate_min_ellipsoid_d.cpp") OR EIGEN3_FOUND) + create_single_source_cgal_program( "${cppfile}" ) + endif() endforeach() else() diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index b991947625a..d6f2df8c92a 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -39,6 +39,16 @@ find_package(TBB QUIET) find_package(OpenCV QUIET) +# Use Eigen +find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +if (NOT EIGEN3_FOUND) + message(STATUS "This project requires the Eigen library, and will not be compiled.") + return() +else() + include( ${EIGEN3_USE_FILE} ) +endif() + + # include for local directory include_directories( BEFORE include ) diff --git a/Generator/examples/Generator/CMakeLists.txt b/Generator/examples/Generator/CMakeLists.txt index ab607583d10..a2a9ce98fbb 100644 --- a/Generator/examples/Generator/CMakeLists.txt +++ b/Generator/examples/Generator/CMakeLists.txt @@ -16,10 +16,20 @@ if ( CGAL_FOUND ) include_directories (BEFORE "../../include") + # Use Eigen + find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) + if (EIGEN3_FOUND) + include( ${EIGEN3_USE_FILE} ) + endif() + # create a target per cppfile file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) foreach(cppfile ${cppfiles}) - create_single_source_cgal_program( "${cppfile}" ) + if(NOT (${cppfile} STREQUAL "random_points_in_tetrahedral_mesh_3.cpp") + OR NOT (${cppfile} STREQUAL "random_points_on_tetrahedral_mesh_3.cpp") + OR EIGEN3_FOUND) + create_single_source_cgal_program( "${cppfile}" ) + endif() endforeach() else() diff --git a/Generator/test/Generator/CMakeLists.txt b/Generator/test/Generator/CMakeLists.txt index ada6b13c2da..8e8c59d2504 100644 --- a/Generator/test/Generator/CMakeLists.txt +++ b/Generator/test/Generator/CMakeLists.txt @@ -16,10 +16,18 @@ if ( CGAL_FOUND ) include_directories (BEFORE "../../include") + # Use Eigen + find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) + if (EIGEN3_FOUND) + include( ${EIGEN3_USE_FILE} ) + endif() + # create a target per cppfile file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) foreach(cppfile ${cppfiles}) - create_single_source_cgal_program( "${cppfile}" ) + if(NOT (${cppfile} STREQUAL "generic_random_test.cpp") OR EIGEN3_FOUND) + create_single_source_cgal_program( "${cppfile}" ) + endif() endforeach() else() diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index 480956dbaf0..40232023833 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -39,6 +39,15 @@ if ( CGAL_FOUND ) endif( LINK_WITH_TBB ) endif() + # Use Eigen + find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) + if (NOT EIGEN3_FOUND) + message(STATUS "This project requires the Eigen library, and will not be compiled.") + return() + else() + include( ${EIGEN3_USE_FILE} ) + endif() + set(VTK_LIBS "") find_package(VTK QUIET COMPONENTS vtkImagingGeneral vtkIOImage NO_MODULE) if(VTK_FOUND) diff --git a/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index 3a3302cc942..87503909cf4 100644 --- a/Mesh_3/test/Mesh_3/CMakeLists.txt +++ b/Mesh_3/test/Mesh_3/CMakeLists.txt @@ -19,6 +19,15 @@ if ( CGAL_FOUND ) include_directories (BEFORE ../../include) include_directories (BEFORE ../../../AABB_tree/include) + # Use Eigen + find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) + if (NOT EIGEN3_FOUND) + message(STATUS "This project requires the Eigen library, and will not be compiled.") + return() + else() + include( ${EIGEN3_USE_FILE} ) + endif() + create_single_source_cgal_program( "test_backward_compatibility.cpp" ) create_single_source_cgal_program( "test_boost_has_xxx.cpp" ) create_single_source_cgal_program( "test_c3t3.cpp" ) diff --git a/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/CMakeLists.txt b/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/CMakeLists.txt index 032db9a7f9a..380426c2f72 100644 --- a/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/CMakeLists.txt +++ b/Point_set_shape_detection_3/examples/Point_set_shape_detection_3/CMakeLists.txt @@ -23,12 +23,18 @@ if ( CGAL_FOUND ) include_directories (BEFORE "../../include") - create_single_source_cgal_program( "shape_detection_basic.cpp" ) - create_single_source_cgal_program( "shape_detection_with_callback.cpp" ) + # Use Eigen + find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) + if (EIGEN3_FOUND) + include( ${EIGEN3_USE_FILE} ) + create_single_source_cgal_program( "shape_detection_basic.cpp" ) + create_single_source_cgal_program( "shape_detection_with_callback.cpp" ) + create_single_source_cgal_program( "plane_regularization.cpp" ) + endif() + create_single_source_cgal_program( "efficient_RANSAC_custom_shape.cpp" ) create_single_source_cgal_program( "efficient_RANSAC_parameters.cpp" ) create_single_source_cgal_program( "efficient_RANSAC_point_access.cpp" ) - create_single_source_cgal_program( "plane_regularization.cpp" ) else()