diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt index 8024959faac..f8902d95092 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt @@ -54,7 +54,8 @@ if (EIGEN3_FOUND) CGAL_target_use_Eigen(refine_fair_example) create_single_source_cgal_program( "shape_smoothing_example.cpp") CGAL_target_use_Eigen(shape_smoothing_example) - + create_single_source_cgal_program( "hole_filling_example_LCC.cpp" ) + CGAL_target_use_Eigen(hole_filling_example_LCC) endif(EIGEN3_FOUND) create_single_source_cgal_program( "self_intersections_example.cpp" ) @@ -81,7 +82,6 @@ create_single_source_cgal_program( "corefinement_mesh_union_with_attributes.cpp" create_single_source_cgal_program( "corefinement_polyhedron_union.cpp" ) create_single_source_cgal_program( "random_perturbation_SM_example.cpp" ) create_single_source_cgal_program( "corefinement_LCC.cpp") -create_single_source_cgal_program( "hole_filling_example_LCC.cpp" ) create_single_source_cgal_program( "detect_features_example.cpp" ) create_single_source_cgal_program( "manifoldness_repair_example.cpp" ) create_single_source_cgal_program( "repair_polygon_soup_example.cpp" ) @@ -89,11 +89,15 @@ create_single_source_cgal_program( "mesh_smoothing_example.cpp") create_single_source_cgal_program( "locate_example.cpp") if(OpenMesh_FOUND) + create_single_source_cgal_program( "compute_normals_example_OM.cpp" ) target_link_libraries( compute_normals_example_OM PRIVATE ${OPENMESH_LIBRARIES} ) -create_single_source_cgal_program( "hole_filling_example_OM.cpp" ) -target_link_libraries( hole_filling_example_OM PRIVATE ${OPENMESH_LIBRARIES} ) +if (EIGEN3_FOUND) + create_single_source_cgal_program( "hole_filling_example_OM.cpp" ) + target_link_libraries( hole_filling_example_OM PRIVATE ${OPENMESH_LIBRARIES} ) + CGAL_target_use_Eigen( hole_filling_example_OM ) +endif() create_single_source_cgal_program( "point_inside_example_OM.cpp") target_link_libraries( point_inside_example_OM PRIVATE ${OPENMESH_LIBRARIES} ) diff --git a/Solver_interface/examples/Solver_interface/CMakeLists.txt b/Solver_interface/examples/Solver_interface/CMakeLists.txt index 0d635310ac7..13ad3314c8e 100644 --- a/Solver_interface/examples/Solver_interface/CMakeLists.txt +++ b/Solver_interface/examples/Solver_interface/CMakeLists.txt @@ -18,21 +18,17 @@ if ( CGAL_FOUND ) CGAL_target_use_Eigen(singular_value_decomposition) create_single_source_cgal_program( "sparse_solvers.cpp" ) CGAL_target_use_Eigen(sparse_solvers) + create_single_source_cgal_program( "diagonalize_matrix.cpp" ) + CGAL_target_use_Eigen(diagonalize_matrix) endif() - create_single_source_cgal_program( "diagonalize_matrix.cpp" ) create_single_source_cgal_program( "mixed_integer_program.cpp" ) find_package( SCIP QUIET) if (SCIP_FOUND) - include_directories( BEFORE ${SCIP_INCLUDE_DIRS} ) - - target_link_libraries( mixed_integer_program PRIVATE ${SCIP_LIBRARIES} ) - - target_compile_definitions(mixed_integer_program PRIVATE -DCGAL_USE_SCIP) - + CGAL_target_use_SCIP(mixed_integer_program) message("SCIP found and used") else() @@ -40,13 +36,8 @@ if ( CGAL_FOUND ) find_package( GLPK QUIET) if (GLPK_FOUND) - - include_directories( BEFORE ${GLPK_INCLUDE_DIR} ) - - target_link_libraries( mixed_integer_program PRIVATE ${GLPK_LIBRARIES} ) - - target_compile_definitions(mixed_integer_program PRIVATE -DCGAL_USE_GLPK) - + + CGAL_target_use_GLPK(mixed_integer_program) message("GLPK found and used") else() diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt index 7e948fdacc3..6e6d1782ce0 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt @@ -39,6 +39,7 @@ if ( CGAL_FOUND ) include( UseOpenMesh ) create_single_source_cgal_program( "all_roi_assign_example_with_OpenMesh.cpp" ) target_link_libraries( all_roi_assign_example_with_OpenMesh PRIVATE ${OPENMESH_LIBRARIES} ) + CGAL_target_use_Eigen(all_roi_assign_example_with_OpenMesh) else() message(STATUS "Example that use OpenMesh will not be compiled.") endif()