From 527569346e885f5dcf8157a48f6cef48c2a55605 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 8 Oct 2024 17:02:41 +0100 Subject: [PATCH 01/29] CGAL: Modernize CMakeLists.txt --- .../Arrangement_on_surface_2/CMakeLists.txt | 18 ++--- BGL/examples/BGL_polyhedron_3/CMakeLists.txt | 2 +- BGL/examples/BGL_surface_mesh/CMakeLists.txt | 2 +- .../Barycentric_coordinates_2/CMakeLists.txt | 4 +- .../Barycentric_coordinates_2/CMakeLists.txt | 6 +- .../Barycentric_coordinates_2/CMakeLists.txt | 10 +-- .../examples/Basic_viewer/CMakeLists.txt | 16 ++--- .../Boolean_set_operations_2/CMakeLists.txt | 2 +- .../test/Box_intersection_d/CMakeLists.txt | 2 +- .../examples/Classification/CMakeLists.txt | 6 +- .../test/Classification/CMakeLists.txt | 4 +- .../examples/Heat_method_3/CMakeLists.txt | 8 +-- .../test/Heat_method_3/CMakeLists.txt | 8 +-- Installation/test/Installation/CMakeLists.txt | 2 +- .../examples/Jet_fitting_3/CMakeLists.txt | 4 +- .../test/Jet_fitting_3/CMakeLists.txt | 2 +- .../Kinetic_space_partition/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- Lab/demo/Lab/CMakeLists.txt | 18 ++--- Lab/demo/Lab/Plugins/AABB_tree/CMakeLists.txt | 2 +- .../Lab/Plugins/Classification/CMakeLists.txt | 6 +- Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt | 16 ++--- Lab/demo/Lab/Plugins/PMP/CMakeLists.txt | 10 +-- Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt | 12 ++-- .../Surface_mesh_deformation/CMakeLists.txt | 2 +- .../Tetrahedral_remeshing/CMakeLists.txt | 2 +- .../demo/Linear_cell_complex/CMakeLists.txt | 2 +- .../Linear_cell_complex/CMakeLists.txt | 6 +- Mesh_2/examples/Mesh_2/CMakeLists.txt | 4 +- Mesh_3/benchmark/Mesh_3/CMakeLists.txt | 2 +- Mesh_3/examples/Mesh_3/CMakeLists.txt | 72 +++++++++---------- Mesh_3/test/Mesh_3/CMakeLists.txt | 4 +- Nef_3/examples/Nef_3/CMakeLists.txt | 2 +- NewKernel_d/test/NewKernel_d/CMakeLists.txt | 2 +- Number_types/test/Number_types/CMakeLists.txt | 2 +- .../Optimal_bounding_box/CMakeLists.txt | 2 +- .../Optimal_bounding_box/CMakeLists.txt | 2 +- .../test/Optimal_bounding_box/CMakeLists.txt | 2 +- Orthtree/examples/Orthtree/CMakeLists.txt | 2 +- .../Periodic_2_triangulation_2/CMakeLists.txt | 2 +- .../examples/Periodic_3_mesh_3/CMakeLists.txt | 2 +- .../test/Periodic_3_mesh_3/CMakeLists.txt | 6 +- .../examples/Point_set_3/CMakeLists.txt | 4 +- Point_set_3/test/Point_set_3/CMakeLists.txt | 2 +- .../Point_set_processing_3/CMakeLists.txt | 16 ++--- .../CMakeLists.txt | 8 +-- .../CMakeLists.txt | 8 +-- Polygon/examples/Polygon/CMakeLists.txt | 8 +-- .../Polygon_mesh_processing/CMakeLists.txt | 4 +- .../Polygon_mesh_processing/CMakeLists.txt | 42 +++++------ .../Polygon_mesh_processing/CMakeLists.txt | 32 ++++----- .../test/Polygon_repair/CMakeLists.txt | 4 +- .../CMakeLists.txt | 6 +- .../CMakeLists.txt | 6 +- Polyhedron/examples/Polyhedron/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../examples/Property_map/CMakeLists.txt | 2 +- Ridges_3/examples/Ridges_3/CMakeLists.txt | 6 +- Ridges_3/test/Ridges_3/CMakeLists.txt | 2 +- SMDS_3/test/SMDS_3/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../test/STL_Extension/CMakeLists.txt | 6 +- .../CMakeLists.txt | 18 ++--- .../benchmark/Shape_detection/CMakeLists.txt | 4 +- .../examples/Shape_detection/CMakeLists.txt | 4 +- .../test/Shape_detection/CMakeLists.txt | 2 +- .../Shape_regularization/CMakeLists.txt | 2 +- .../Shape_regularization/CMakeLists.txt | 4 +- .../test/Shape_regularization/CMakeLists.txt | 2 +- .../examples/Solver_interface/CMakeLists.txt | 12 ++-- .../Spatial_searching/CMakeLists.txt | 2 +- .../examples/Spatial_searching/CMakeLists.txt | 6 +- .../examples/Spatial_sorting/CMakeLists.txt | 2 +- .../test/Spatial_sorting/CMakeLists.txt | 2 +- .../Straight_skeleton_2/CMakeLists.txt | 12 ++-- .../test/Straight_skeleton_2/CMakeLists.txt | 12 ++-- .../CMakeLists.txt | 2 +- .../examples/Surface_mesh/CMakeLists.txt | 2 +- .../Surface_mesh_approximation/CMakeLists.txt | 12 ++-- .../Surface_mesh_approximation/CMakeLists.txt | 20 +++--- .../optimal_rotation/CMakeLists.txt | 2 +- .../Surface_mesh_deformation/CMakeLists.txt | 2 +- .../Surface_mesh_deformation/CMakeLists.txt | 2 +- .../Surface_mesh_deformation/CMakeLists.txt | 6 +- .../CMakeLists.txt | 16 ++--- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 4 +- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 4 +- .../CMakeLists.txt | 4 +- .../CMakeLists.txt | 4 +- .../Surface_mesh_topology/CMakeLists.txt | 26 +++---- .../test/Surface_mesh_topology/CMakeLists.txt | 8 +-- .../test/Surface_sweep_2/CMakeLists.txt | 4 +- TDS_3/test/TDS_3/CMakeLists.txt | 2 +- .../Tetrahedral_remeshing/CMakeLists.txt | 10 +-- .../test/Tetrahedral_remeshing/CMakeLists.txt | 12 ++-- .../applications/Triangulation/CMakeLists.txt | 4 +- .../benchmark/Triangulation/CMakeLists.txt | 4 +- .../examples/Triangulation/CMakeLists.txt | 2 +- .../test/Triangulation/CMakeLists.txt | 2 +- .../examples/Triangulation_2/CMakeLists.txt | 8 +-- .../demo/Triangulation_3/CMakeLists.txt | 2 +- .../examples/Triangulation_3/CMakeLists.txt | 8 +-- .../test/Triangulation_3/CMakeLists.txt | 2 +- .../Triangulation_on_sphere_2/CMakeLists.txt | 2 +- .../examples/Voronoi_diagram_2/CMakeLists.txt | 2 +- .../test/Voronoi_diagram_2/CMakeLists.txt | 2 +- Weights/examples/Weights/CMakeLists.txt | 2 +- 111 files changed, 360 insertions(+), 360 deletions(-) diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/CMakeLists.txt index 61f8002eb83f..2784310f4ede 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/CMakeLists.txt @@ -16,15 +16,15 @@ foreach(cppfile ${cppfiles}) endforeach() if(CGAL_Qt6_FOUND) - target_link_libraries(draw_arr PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(linear_conics PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(parabolas PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(ellipses PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(hyperbolas PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(polylines PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(circles PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(circular_arcs PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(spherical_insert PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_arr PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(linear_conics PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(parabolas PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(ellipses PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(hyperbolas PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(polylines PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(circles PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(circular_arcs PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(spherical_insert PRIVATE CGAL::CGAL_Basic_viewer) else() message( STATUS diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index eabe0b1bd405..8c5c669409b1 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -28,7 +28,7 @@ find_package(METIS QUIET) include(CGAL_METIS_support) if(TARGET CGAL::METIS_support) create_single_source_cgal_program("polyhedron_partition.cpp") - target_link_libraries(polyhedron_partition PUBLIC CGAL::METIS_support) + target_link_libraries(polyhedron_partition PRIVATE CGAL::METIS_support) else() message(STATUS "NOTICE: The example 'polyhedron_partition' requires the METIS library, and will not be compiled.") endif() diff --git a/BGL/examples/BGL_surface_mesh/CMakeLists.txt b/BGL/examples/BGL_surface_mesh/CMakeLists.txt index d1b34ec36026..921104583dc8 100644 --- a/BGL/examples/BGL_surface_mesh/CMakeLists.txt +++ b/BGL/examples/BGL_surface_mesh/CMakeLists.txt @@ -14,7 +14,7 @@ find_package(METIS QUIET) include(CGAL_METIS_support) if(TARGET CGAL::METIS_support) create_single_source_cgal_program("surface_mesh_partition.cpp") - target_link_libraries(surface_mesh_partition PUBLIC CGAL::METIS_support) + target_link_libraries(surface_mesh_partition PRIVATE CGAL::METIS_support) else() message(STATUS "NOTICE: Examples that use the METIS library will not be compiled.") endif() diff --git a/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt index fcffb885cd4b..11d40187de30 100644 --- a/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt @@ -18,9 +18,9 @@ find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) 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) + target_link_libraries(benchmark_hm_4_vertices PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("benchmark_hm_n_vertices.cpp") - target_link_libraries(benchmark_hm_n_vertices PUBLIC CGAL::Eigen3_support) + target_link_libraries(benchmark_hm_n_vertices PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: Several benchmarks require the Eigen library, and will not be compiled.") endif() diff --git a/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt index e7d800ca44ef..cd3533b5ca77 100644 --- a/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt @@ -21,11 +21,11 @@ find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) 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) + target_link_libraries(affine_coordinates PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("harmonic_coordinates.cpp") - target_link_libraries(harmonic_coordinates PUBLIC CGAL::Eigen3_support) + target_link_libraries(harmonic_coordinates PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("shape_deformation.cpp") - target_link_libraries(shape_deformation PUBLIC CGAL::Eigen3_support) + target_link_libraries(shape_deformation PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: Several examples require the Eigen library, and will not be compiled.") endif() diff --git a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt index 110315938f9e..c50f052a490d 100644 --- a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt @@ -46,15 +46,15 @@ find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) 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) + target_link_libraries(test_hm_unit_square PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("test_hm_const_linear_precision.cpp") - target_link_libraries(test_hm_const_linear_precision PUBLIC CGAL::Eigen3_support) + target_link_libraries(test_hm_const_linear_precision PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("test_hm_triangle.cpp") - target_link_libraries(test_hm_triangle PUBLIC CGAL::Eigen3_support) + target_link_libraries(test_hm_triangle PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("test_bc_projection_traits.cpp") - target_link_libraries(test_bc_projection_traits PUBLIC CGAL::Eigen3_support) + target_link_libraries(test_bc_projection_traits PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("test_bc_all_coordinates.cpp") - target_link_libraries(test_bc_all_coordinates PUBLIC CGAL::Eigen3_support) + target_link_libraries(test_bc_all_coordinates PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: Several tests require the Eigen library, and will not be compiled.") endif() diff --git a/Basic_viewer/examples/Basic_viewer/CMakeLists.txt b/Basic_viewer/examples/Basic_viewer/CMakeLists.txt index 29c492e88641..305e502bd477 100644 --- a/Basic_viewer/examples/Basic_viewer/CMakeLists.txt +++ b/Basic_viewer/examples/Basic_viewer/CMakeLists.txt @@ -23,19 +23,19 @@ create_single_source_cgal_program("draw_surface_mesh_vcolor.cpp") if(CGAL_Qt6_FOUND) #link it with the required CGAL libraries - target_link_libraries(draw_lcc PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(draw_mesh_and_points PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(draw_several_windows PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(draw_surface_mesh_height PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(draw_surface_mesh_small_faces PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(draw_surface_mesh_vcolor PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_lcc PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_mesh_and_points PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_several_windows PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_surface_mesh_height PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_surface_mesh_small_faces PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_surface_mesh_vcolor PRIVATE CGAL::CGAL_Basic_viewer) else() message("CGAL_Qt6 not configured: examples that require Qt will not be compiled.") endif() if(TARGET CGAL::Eigen3_support) - target_link_libraries(draw_mesh_and_points PUBLIC CGAL::Eigen3_support) - target_link_libraries(draw_several_windows PUBLIC CGAL::Eigen3_support) + target_link_libraries(draw_mesh_and_points PRIVATE CGAL::Eigen3_support) + target_link_libraries(draw_several_windows PRIVATE CGAL::Eigen3_support) endif() #end of the file diff --git a/Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt b/Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt index 94061c2d362c..aee59825ba1a 100644 --- a/Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt +++ b/Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt @@ -16,7 +16,7 @@ foreach(cppfile ${cppfiles}) endforeach() if(CGAL_Qt6_FOUND) - target_link_libraries(draw_polygon_set PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_polygon_set PRIVATE CGAL::CGAL_Basic_viewer) else() message(STATUS "NOTICE: The example 'draw_polygon_set' requires Qt and drawing will be disabled.") endif() diff --git a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt index 5d9d3e4be8b0..a82e578f3453 100644 --- a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt +++ b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt @@ -15,7 +15,7 @@ create_single_source_cgal_program("test_Has_member_report.cpp") find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) - target_link_libraries(test_box_grid PUBLIC CGAL::TBB_support) + target_link_libraries(test_box_grid PRIVATE CGAL::TBB_support) else() message(STATUS "NOTICE: Intel TBB was not found. Parallel code will not be used.") endif() diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index 3e68edb74956..61060474db98 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -52,7 +52,7 @@ if(TARGET CGAL::OpenCV_support) message(STATUS "Found OpenCV") create_single_source_cgal_program( "example_opencv_random_forest.cpp" ) - target_link_libraries(example_opencv_random_forest PUBLIC CGAL::OpenCV_support) + target_link_libraries(example_opencv_random_forest PRIVATE CGAL::OpenCV_support) else() message("NOTICE: OpenCV was not found. OpenCV random forest predicate for classification won't be available.") endif() @@ -68,11 +68,11 @@ foreach(target gis_tutorial_example example_deprecated_conversion) if(TARGET ${target}) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support CGAL::Boost_iostreams_support CGAL::Boost_serialization_support) if(TARGET CGAL::TBB_support) - target_link_libraries(${target} PUBLIC CGAL::TBB_support) + target_link_libraries(${target} PRIVATE CGAL::TBB_support) endif() endif() endforeach() diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index a50e55a9ecd7..8b3ccbf3da3c 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -41,10 +41,10 @@ create_single_source_cgal_program("test_classification_point_set.cpp") create_single_source_cgal_program("test_classification_io.cpp") foreach(target test_classification_point_set test_classification_io) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support CGAL::Boost_iostreams_support CGAL::Boost_serialization_support) if(TARGET CGAL::TBB_support) - target_link_libraries(${target} PUBLIC CGAL::TBB_support) + target_link_libraries(${target} PRIVATE CGAL::TBB_support) endif() endforeach() diff --git a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt index 5eeb1961f16a..250921f012f7 100644 --- a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt @@ -18,10 +18,10 @@ endif() include_directories(BEFORE include) create_single_source_cgal_program("heat_method.cpp") -target_link_libraries(heat_method PUBLIC CGAL::Eigen3_support) +target_link_libraries(heat_method PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_polyhedron.cpp") -target_link_libraries(heat_method_polyhedron PUBLIC CGAL::Eigen3_support) +target_link_libraries(heat_method_polyhedron PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh.cpp") -target_link_libraries(heat_method_surface_mesh PUBLIC CGAL::Eigen3_support) +target_link_libraries(heat_method_surface_mesh PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh_direct.cpp") -target_link_libraries(heat_method_surface_mesh_direct PUBLIC CGAL::Eigen3_support) +target_link_libraries(heat_method_surface_mesh_direct PRIVATE CGAL::Eigen3_support) diff --git a/Heat_method_3/test/Heat_method_3/CMakeLists.txt b/Heat_method_3/test/Heat_method_3/CMakeLists.txt index 314f023165cd..056f15040a38 100644 --- a/Heat_method_3/test/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/test/Heat_method_3/CMakeLists.txt @@ -18,10 +18,10 @@ endif() include_directories(BEFORE include) create_single_source_cgal_program("heat_method_concept.cpp") -target_link_libraries(heat_method_concept PUBLIC CGAL::Eigen3_support) +target_link_libraries(heat_method_concept PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh_test.cpp") -target_link_libraries(heat_method_surface_mesh_test PUBLIC CGAL::Eigen3_support) +target_link_libraries(heat_method_surface_mesh_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh_direct_test.cpp") -target_link_libraries(heat_method_surface_mesh_direct_test PUBLIC CGAL::Eigen3_support) +target_link_libraries(heat_method_surface_mesh_direct_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh_intrinsic_test.cpp") -target_link_libraries(heat_method_surface_mesh_intrinsic_test PUBLIC CGAL::Eigen3_support) +target_link_libraries(heat_method_surface_mesh_intrinsic_test PRIVATE CGAL::Eigen3_support) diff --git a/Installation/test/Installation/CMakeLists.txt b/Installation/test/Installation/CMakeLists.txt index fa828e9e82b3..5fb67b8eae23 100644 --- a/Installation/test/Installation/CMakeLists.txt +++ b/Installation/test/Installation/CMakeLists.txt @@ -33,7 +33,7 @@ find_package(TBB QUIET) include(CGAL_TBB_support) create_single_source_cgal_program("test_TBB.cpp") if(TARGET CGAL::TBB_support) - target_link_libraries(test_TBB PUBLIC CGAL::TBB_support) + target_link_libraries(test_TBB PRIVATE CGAL::TBB_support) endif() create_link_to_program(CGAL) diff --git a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt index d28114222f44..4785a6647bc6 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt @@ -15,7 +15,7 @@ if(TARGET CGAL::Eigen3_support) find_package(Boost QUIET COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) create_single_source_cgal_program("Mesh_estimation.cpp") - target_link_libraries(Mesh_estimation PUBLIC CGAL::Eigen3_support) + target_link_libraries(Mesh_estimation PRIVATE CGAL::Eigen3_support) if(TARGET Boost::program_options) target_link_libraries(Mesh_estimation PRIVATE Boost::program_options) else() @@ -26,7 +26,7 @@ if(TARGET CGAL::Eigen3_support) endif() create_single_source_cgal_program("Single_estimation.cpp") - target_link_libraries(Single_estimation PUBLIC CGAL::Eigen3_support) + target_link_libraries(Single_estimation PRIVATE CGAL::Eigen3_support) else() message("NOTICE: These examples require Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt index 5995efe53892..114067d52478 100644 --- a/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt @@ -11,7 +11,7 @@ find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) 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) + target_link_libraries(blind_1pt PRIVATE CGAL::Eigen3_support) else() message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt b/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt index 344a8029ca7d..2c61e71ecb0b 100644 --- a/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt +++ b/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt @@ -17,7 +17,7 @@ if(Eigen3_FOUND) foreach(target ${targets}) create_single_source_cgal_program("${target}.cpp") - target_link_libraries(${target} PUBLIC CGAL::Eigen_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen_support) endforeach() else() message(ERROR "This program requires the Eigen library, and will not be compiled.") diff --git a/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt b/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt index 90a1acd129e7..932827cf0549 100644 --- a/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt +++ b/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt @@ -17,7 +17,7 @@ if(Eigen3_FOUND) foreach(target ${targets}) create_single_source_cgal_program("${target}.cpp") - target_link_libraries(${target} PUBLIC CGAL::Eigen_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen_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 ada01e60017c..64b499f53154 100644 --- a/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt +++ b/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt @@ -17,7 +17,7 @@ if(Eigen3_FOUND) foreach(target ${targets}) create_single_source_cgal_program("${target}.cpp") - target_link_libraries(${target} PUBLIC CGAL::Eigen_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen_support) endforeach() else() message(ERROR "This program requires the Eigen library, and will not be compiled.") diff --git a/Lab/demo/Lab/CMakeLists.txt b/Lab/demo/Lab/CMakeLists.txt index eb2a5dc56b69..a1ff59c01b51 100644 --- a/Lab/demo/Lab/CMakeLists.txt +++ b/Lab/demo/Lab/CMakeLists.txt @@ -250,8 +250,8 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) scene_basic_objects ${TBB_LIBRARIES}) if(TARGET CGAL::TBB_support) - target_link_libraries(scene_c3t3_item PUBLIC CGAL::TBB_support) - target_link_libraries(scene_triangulation_3_item PUBLIC CGAL::TBB_support) + target_link_libraries(scene_c3t3_item PRIVATE CGAL::TBB_support) + target_link_libraries(scene_triangulation_3_item PRIVATE CGAL::TBB_support) endif() if(COMMAND target_precompile_headers) # Support for precompiled headers, for Mesh_3 (since CMake 3.16) @@ -278,7 +278,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) add_item(scene_surface_mesh_item Scene_surface_mesh_item.cpp) if(TBB_FOUND) - target_link_libraries(scene_surface_mesh_item PUBLIC CGAL::TBB_support) + target_link_libraries(scene_surface_mesh_item PRIVATE CGAL::TBB_support) endif() # special @@ -293,7 +293,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) target_link_libraries(scene_selection_item PUBLIC scene_item_decorator scene_k_ring_selection) if(TBB_FOUND) - target_link_libraries(scene_selection_item PUBLIC CGAL::TBB_support) + target_link_libraries(scene_selection_item PRIVATE CGAL::TBB_support) endif() add_item(scene_shortest_path_item @@ -307,9 +307,9 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) if(TARGET CGAL::Eigen3_support) add_item(scene_textured_item Scene_textured_surface_mesh_item.cpp texture.cpp) - target_link_libraries(scene_textured_item PUBLIC CGAL::Eigen3_support) + target_link_libraries(scene_textured_item PRIVATE CGAL::Eigen3_support) add_item(scene_mcf_item Plugins/PMP/Scene_mcf_item.cpp) - target_link_libraries(scene_mcf_item PUBLIC CGAL::Eigen3_support) + target_link_libraries(scene_mcf_item PRIVATE CGAL::Eigen3_support) endif() add_item(scene_implicit_function_item Scene_implicit_function_item.cpp) @@ -325,12 +325,12 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) add_item(scene_points_with_normal_item Scene_points_with_normal_item.cpp) if(TARGET CGAL::Eigen3_support) target_link_libraries(scene_points_with_normal_item - PUBLIC CGAL::Eigen3_support) + PRIVATE CGAL::Eigen3_support) endif() if(TBB_FOUND) target_link_libraries(scene_points_with_normal_item - PUBLIC CGAL::TBB_support) + PRIVATE CGAL::TBB_support) endif() add_item(scene_polylines_item Scene_polylines_item.cpp) @@ -381,7 +381,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) target_link_libraries(CGALlab PRIVATE demo_framework) # Link with CGAL - target_link_libraries(CGALlab PUBLIC CGAL::CGAL_Qt6) + target_link_libraries(CGALlab PRIVATE CGAL::CGAL_Qt6) add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGALlab) diff --git a/Lab/demo/Lab/Plugins/AABB_tree/CMakeLists.txt b/Lab/demo/Lab/Plugins/AABB_tree/CMakeLists.txt index 7adb20e68eef..3a4f0aee0a30 100644 --- a/Lab/demo/Lab/Plugins/AABB_tree/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/AABB_tree/CMakeLists.txt @@ -8,5 +8,5 @@ cgal_lab_plugin(cut_plugin Cut_plugin) target_link_libraries(cut_plugin PUBLIC scene_surface_mesh_item scene_basic_objects scene_color_ramp) if(TARGET CGAL::TBB_support) - target_link_libraries(cut_plugin PUBLIC CGAL::TBB_support) + target_link_libraries(cut_plugin PRIVATE CGAL::TBB_support) endif() diff --git a/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt b/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt index 1152b97074ee..dabd10ef5276 100644 --- a/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt @@ -48,16 +48,16 @@ if(TARGET CGAL::Eigen3_support) endif() if(TARGET CGAL::Boost_serialization_support AND TARGET CGAL::Boost_iostreams_support) - target_link_libraries(classification_plugin PUBLIC CGAL::Boost_serialization_support + target_link_libraries(classification_plugin PRIVATE CGAL::Boost_serialization_support CGAL::Boost_iostreams_support) endif() if(TARGET CGAL::OpenCV_support) - target_link_libraries(classification_plugin PUBLIC CGAL::OpenCV_support) + target_link_libraries(classification_plugin PRIVATE CGAL::OpenCV_support) endif() if(TARGET CGAL::TBB_support) - target_link_libraries(classification_plugin PUBLIC CGAL::TBB_support) + target_link_libraries(classification_plugin PRIVATE CGAL::TBB_support) endif() add_dependencies(classification_plugin point_set_selection_plugin selection_plugin) diff --git a/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt b/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt index 2234d34db36d..6898456fc8ca 100644 --- a/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt @@ -34,7 +34,7 @@ if(ITK_FOUND) include(CGAL_ITK_support) message(STATUS "ITK found") include(${ITK_USE_FILE}) - target_link_libraries(mesh_3_plugin PUBLIC CGAL::ITK_support) + target_link_libraries(mesh_3_plugin PRIVATE CGAL::ITK_support) endif(ITK_FOUND) find_package(VTK 9.0 QUIET COMPONENTS ImagingGeneral IOImage IOXML NO_MODULE) @@ -83,7 +83,7 @@ target_link_libraries( find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) - target_link_libraries(mesh_3_optimization_plugin PUBLIC CGAL::Eigen3_support) + target_link_libraries(mesh_3_optimization_plugin PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: The Mesh_3_optimization_plugin requires Eigen, which was not found." "A deprecated class will be used to replace it. Warnings are to be expected.") @@ -102,10 +102,10 @@ cgal_lab_plugin(c3t3_rib_exporter_plugin C3t3_rib_exporter_plugin target_link_libraries(c3t3_rib_exporter_plugin PUBLIC scene_c3t3_item) if(TBB_FOUND) - target_link_libraries(mesh_3_plugin PUBLIC CGAL::TBB_support) - target_link_libraries(mesh_3_optimization_plugin PUBLIC CGAL::TBB_support) - target_link_libraries(c3t3_io_plugin PUBLIC CGAL::TBB_support) - target_link_libraries(c3t3_rib_exporter_plugin PUBLIC CGAL::TBB_support) + target_link_libraries(mesh_3_plugin PRIVATE CGAL::TBB_support) + target_link_libraries(mesh_3_optimization_plugin PRIVATE CGAL::TBB_support) + target_link_libraries(c3t3_io_plugin PRIVATE CGAL::TBB_support) + target_link_libraries(c3t3_rib_exporter_plugin PRIVATE CGAL::TBB_support) endif() qt6_wrap_ui(offsetMeshingUI_FILES Offset_meshing_dialog.ui) @@ -115,8 +115,8 @@ target_link_libraries(offset_meshing_plugin PUBLIC scene_surface_mesh_item scene_polygon_soup_item scene_polylines_item) if(TARGET CGAL::Eigen3_support) - target_link_libraries(offset_meshing_plugin PUBLIC CGAL::Eigen3_support) + target_link_libraries(offset_meshing_plugin PRIVATE CGAL::Eigen3_support) endif() if(TARGET CGAL::TBB_support) - target_link_libraries(offset_meshing_plugin PUBLIC CGAL::TBB_support) + target_link_libraries(offset_meshing_plugin PRIVATE CGAL::TBB_support) endif() diff --git a/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt b/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt index 507cd7b1df16..7e8a8b3841db 100644 --- a/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt @@ -54,14 +54,14 @@ if(TARGET CGAL::Eigen3_support) find_package(Ceres QUIET) include(CGAL_Ceres_support) if(TARGET CGAL::Ceres_support) - target_link_libraries(smoothing_plugin PUBLIC CGAL::Ceres_support) + target_link_libraries(smoothing_plugin PRIVATE CGAL::Ceres_support) endif() set_package_properties( Ceres PROPERTIES DESCRIPTION "A large scale non-linear optimization library." PURPOSE "Can be used as a solver in the smoothing plugin.") - target_link_libraries(extrude_plugin PUBLIC CGAL::Eigen3_support) + target_link_libraries(extrude_plugin PRIVATE CGAL::Eigen3_support) qt6_wrap_ui(remeshPlanarPatchesUI_FILES Remesh_planar_patches_dialog.ui) cgal_lab_plugin(remesh_planar_patches_plugin Remesh_planar_patches_plugin @@ -135,7 +135,7 @@ qt6_wrap_ui( repairUI_FILES RemoveNeedlesDialog.ui SelfSnapDialog.ui AddBboxDial cgal_lab_plugin(repair_polyhedron_plugin Repair_polyhedron_plugin ${repairUI_FILES} KEYWORDS PMP) target_link_libraries(repair_polyhedron_plugin PUBLIC scene_points_with_normal_item scene_surface_mesh_item scene_polygon_soup_item) if(TARGET CGAL::TBB_support) - target_link_libraries(repair_polyhedron_plugin PUBLIC CGAL::TBB_support) + target_link_libraries(repair_polyhedron_plugin PRIVATE CGAL::TBB_support) endif() if(TARGET CGAL::Eigen3_support) @@ -146,7 +146,7 @@ if(TARGET CGAL::Eigen3_support) scene_selection_item CGAL::Eigen3_support) if(TARGET CGAL::TBB_support) - target_link_libraries(isotropic_remeshing_plugin PUBLIC CGAL::TBB_support) + target_link_libraries(isotropic_remeshing_plugin PRIVATE CGAL::TBB_support) endif() else() @@ -157,7 +157,7 @@ cgal_lab_plugin(distance_plugin Distance_plugin KEYWORDS PMP) target_link_libraries(distance_plugin PUBLIC scene_surface_mesh_item scene_color_ramp) if(TARGET CGAL::TBB_support) - target_link_libraries(distance_plugin PUBLIC CGAL::TBB_support) + target_link_libraries(distance_plugin PRIVATE CGAL::TBB_support) endif() cgal_lab_plugin(detect_sharp_edges_plugin Detect_sharp_edges_plugin KEYWORDS Viewer Mesh_3 PMP) diff --git a/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt b/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt index ff425160f4b4..55d67500fea9 100644 --- a/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt @@ -41,9 +41,9 @@ if(TARGET CGAL::Eigen3_support) scene_points_with_normal_item CGAL::Eigen3_support) if(TARGET CGAL::SCIP_support) - target_link_libraries(surface_reconstruction_plugin PUBLIC CGAL::SCIP_support) + target_link_libraries(surface_reconstruction_plugin PRIVATE CGAL::SCIP_support) elseif(TARGET CGAL::GLPK_support) - target_link_libraries(surface_reconstruction_plugin PUBLIC CGAL::GLPK_support) + target_link_libraries(surface_reconstruction_plugin PRIVATE CGAL::GLPK_support) endif() qt6_wrap_ui(point_set_normal_estimationUI_FILES @@ -109,14 +109,14 @@ if(TARGET CGAL::Eigen3_support) ${register_point_setsUI_FILES} KEYWORDS PointSetProcessing) target_link_libraries(register_point_sets_plugin PUBLIC scene_points_with_normal_item) - target_link_libraries(register_point_sets_plugin PUBLIC CGAL::Eigen3_support) + target_link_libraries(register_point_sets_plugin PRIVATE CGAL::Eigen3_support) if(TARGET CGAL::OpenGR_support) target_link_libraries(register_point_sets_plugin - PUBLIC CGAL::OpenGR_support) + PRIVATE CGAL::OpenGR_support) endif() if(TARGET CGAL::pointmatcher_support) target_link_libraries(register_point_sets_plugin - PUBLIC CGAL::pointmatcher_support) + PRIVATE CGAL::pointmatcher_support) endif() else() message(STATUS "NOTICE: OpenGR and libpointmatcher were not found. Registration plugin will not be available.") @@ -226,7 +226,7 @@ if(TARGET CGAL::TBB_support) alpha_shape_plugin point_set_to_mesh_distance_plugin) if(TARGET ${plugin}) - target_link_libraries(${plugin} PUBLIC CGAL::TBB_support) + target_link_libraries(${plugin} PRIVATE CGAL::TBB_support) endif() endforeach() endif() diff --git a/Lab/demo/Lab/Plugins/Surface_mesh_deformation/CMakeLists.txt b/Lab/demo/Lab/Plugins/Surface_mesh_deformation/CMakeLists.txt index e16feadef0da..56a87f647fd7 100644 --- a/Lab/demo/Lab/Plugins/Surface_mesh_deformation/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Surface_mesh_deformation/CMakeLists.txt @@ -7,7 +7,7 @@ if(TARGET CGAL::Eigen3_support AND "${EIGEN3_VERSION}" VERSION_GREATER "3.1.90") Scene_edit_polyhedron_item.cpp ${editionUI_FILES}) target_link_libraries( - scene_edit_item PUBLIC CGAL::Eigen3_support scene_surface_mesh_item + scene_edit_item PRIVATE CGAL::Eigen3_support scene_surface_mesh_item scene_k_ring_selection scene_basic_objects) cgal_lab_plugin(edit_plugin Edit_polyhedron_plugin Deform_mesh.ui) diff --git a/Lab/demo/Lab/Plugins/Tetrahedral_remeshing/CMakeLists.txt b/Lab/demo/Lab/Plugins/Tetrahedral_remeshing/CMakeLists.txt index faa1326b9569..1bd5a681ae3b 100644 --- a/Lab/demo/Lab/Plugins/Tetrahedral_remeshing/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Tetrahedral_remeshing/CMakeLists.txt @@ -17,5 +17,5 @@ target_link_libraries(tetrahedral_remeshing_plugin PUBLIC scene_c3t3_item find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) - target_link_libraries(tetrahedral_remeshing_plugin PUBLIC CGAL::Eigen3_support) + target_link_libraries(tetrahedral_remeshing_plugin PRIVATE CGAL::Eigen3_support) endif() diff --git a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt index d0349077d7ff..33a5b9b4c1f7 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt @@ -61,7 +61,7 @@ else() add_to_cached_list(CGAL_EXECUTABLE_TARGETS Linear_cell_complex_3_demo) target_link_libraries(Linear_cell_complex_3_demo - PUBLIC CGAL::CGAL CGAL::CGAL_Qt6 Qt6::OpenGL) + PRIVATE CGAL::CGAL CGAL::CGAL_Qt6 Qt6::OpenGL) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(Linear_cell_complex_3_demo) diff --git a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt index 27ab5b842c5f..bec92c80e309 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt @@ -30,7 +30,7 @@ create_single_source_cgal_program("voronoi_3.cpp") create_single_source_cgal_program("draw_linear_cell_complex.cpp") if(CGAL_Qt6_FOUND) - target_link_libraries(draw_linear_cell_complex PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(linear_cell_complex_3_incremental_builder PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(linear_cell_complex_3_insert PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_linear_cell_complex PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(linear_cell_complex_3_incremental_builder PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(linear_cell_complex_3_insert PRIVATE CGAL::CGAL_Basic_viewer) endif() diff --git a/Mesh_2/examples/Mesh_2/CMakeLists.txt b/Mesh_2/examples/Mesh_2/CMakeLists.txt index 1444754e8a01..474a477a39ab 100644 --- a/Mesh_2/examples/Mesh_2/CMakeLists.txt +++ b/Mesh_2/examples/Mesh_2/CMakeLists.txt @@ -13,6 +13,6 @@ foreach(cppfile ${cppfiles}) endforeach() if(CGAL_Qt6_FOUND) - target_link_libraries(mesh_with_seeds PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(mesh_marked_domain PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(mesh_with_seeds PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(mesh_marked_domain PRIVATE CGAL::CGAL_Basic_viewer) endif() diff --git a/Mesh_3/benchmark/Mesh_3/CMakeLists.txt b/Mesh_3/benchmark/Mesh_3/CMakeLists.txt index 16a0064cfd42..a74707749002 100644 --- a/Mesh_3/benchmark/Mesh_3/CMakeLists.txt +++ b/Mesh_3/benchmark/Mesh_3/CMakeLists.txt @@ -35,7 +35,7 @@ endif() create_single_source_cgal_program("benchmark_mesh_3.cpp") if(TARGET CGAL::TBB_support) - target_link_libraries(benchmark_mesh_3 PUBLIC CGAL::TBB_support) + target_link_libraries(benchmark_mesh_3 PRIVATE CGAL::TBB_support) endif() # Link with Boost.ProgramOptions (optional) diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index f259e406cc48..aadcc5060aed 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -36,33 +36,33 @@ else() endif() create_single_source_cgal_program("mesh_hybrid_mesh_domain.cpp") -target_link_libraries(mesh_hybrid_mesh_domain PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_hybrid_mesh_domain PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_implicit_sphere.cpp") -target_link_libraries(mesh_implicit_sphere PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_implicit_sphere PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_implicit_ellipsoid.cpp") -target_link_libraries(mesh_implicit_ellipsoid PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_implicit_ellipsoid PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_implicit_sphere_variable_size.cpp") -target_link_libraries(mesh_implicit_sphere_variable_size PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_implicit_sphere_variable_size PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_two_implicit_spheres_with_balls.cpp") -target_link_libraries(mesh_two_implicit_spheres_with_balls PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_two_implicit_spheres_with_balls PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_implicit_domains_2.cpp" "implicit_functions.cpp") -target_link_libraries(mesh_implicit_domains_2 PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_implicit_domains_2 PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_cubes_intersection.cpp") -target_link_libraries(mesh_cubes_intersection PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_cubes_intersection PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_cubes_intersection_with_features.cpp") -target_link_libraries(mesh_cubes_intersection_with_features PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_cubes_intersection_with_features PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_implicit_domains.cpp" "implicit_functions.cpp") -target_link_libraries(mesh_implicit_domains PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_implicit_domains PRIVATE CGAL::Eigen3_support) find_package( ITT QUIET ) if(TARGET ITT::ITT) @@ -71,99 +71,99 @@ if(TARGET ITT::ITT) endif() create_single_source_cgal_program( "mesh_polyhedral_domain.cpp" ) -target_link_libraries(mesh_polyhedral_domain PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_polyhedral_domain PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_polyhedral_domain_sm.cpp") -target_link_libraries(mesh_polyhedral_domain_sm PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_polyhedral_domain_sm PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program( "mesh_polyhedral_domain_with_surface_inside.cpp") target_link_libraries(mesh_polyhedral_domain_with_surface_inside - PUBLIC CGAL::Eigen3_support) + PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("remesh_polyhedral_surface.cpp") -target_link_libraries(remesh_polyhedral_surface PUBLIC CGAL::Eigen3_support) +target_link_libraries(remesh_polyhedral_surface PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("remesh_polyhedral_surface_sm.cpp") -target_link_libraries(remesh_polyhedral_surface_sm PUBLIC CGAL::Eigen3_support) +target_link_libraries(remesh_polyhedral_surface_sm PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_polyhedral_domain_with_features.cpp") target_link_libraries(mesh_polyhedral_domain_with_features - PUBLIC CGAL::Eigen3_support) + PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_polyhedral_domain_with_features_sizing.cpp") target_link_libraries(mesh_polyhedral_domain_with_features_sizing - PUBLIC CGAL::Eigen3_support) + PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_polyhedral_domain_with_edge_distance.cpp") target_link_libraries(mesh_polyhedral_domain_with_edge_distance - PUBLIC CGAL::Eigen3_support) + PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_polyhedral_domain_with_features_sm.cpp") target_link_libraries(mesh_polyhedral_domain_with_features_sm - PUBLIC CGAL::Eigen3_support) + PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program( "mesh_polyhedral_domain_with_lipschitz_sizing.cpp") target_link_libraries(mesh_polyhedral_domain_with_lipschitz_sizing - PUBLIC CGAL::Eigen3_support) + PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_polyhedral_complex.cpp") -target_link_libraries(mesh_polyhedral_complex PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_polyhedral_complex PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_polyhedral_complex_sm.cpp") -target_link_libraries(mesh_polyhedral_complex_sm PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_polyhedral_complex_sm PRIVATE CGAL::Eigen3_support) if(TARGET CGAL::CGAL_ImageIO) if(VTK_FOUND) create_single_source_cgal_program("mesh_3D_gray_vtk_image.cpp") target_link_libraries(mesh_3D_gray_vtk_image - PUBLIC CGAL::Eigen3_support + PRIVATE CGAL::Eigen3_support CGAL::CGAL_ImageIO PRIVATE ${VTK_LIBRARIES}) add_to_cached_list(CGAL_EXECUTABLE_TARGETS mesh_3D_gray_vtk_image) endif() create_single_source_cgal_program("mesh_3D_gray_image.cpp") - target_link_libraries(mesh_3D_gray_image PUBLIC CGAL::Eigen3_support) + target_link_libraries(mesh_3D_gray_image PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_3D_gray_image_multiple_values.cpp") target_link_libraries(mesh_3D_gray_image_multiple_values - PUBLIC CGAL::Eigen3_support) + PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_3D_image_with_features.cpp") - target_link_libraries(mesh_3D_image_with_features PUBLIC CGAL::Eigen3_support) + target_link_libraries(mesh_3D_image_with_features PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_3D_image_with_input_features.cpp") - target_link_libraries(mesh_3D_image_with_input_features PUBLIC CGAL::Eigen3_support) + target_link_libraries(mesh_3D_image_with_input_features PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_3D_image_with_detection_of_features.cpp") - target_link_libraries(mesh_3D_image_with_detection_of_features PUBLIC CGAL::Eigen3_support) + target_link_libraries(mesh_3D_image_with_detection_of_features PRIVATE CGAL::Eigen3_support) if(CGAL_ImageIO_USE_ZLIB) create_single_source_cgal_program("mesh_optimization_example.cpp") - target_link_libraries(mesh_optimization_example PUBLIC CGAL::Eigen3_support) + target_link_libraries(mesh_optimization_example PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_optimization_lloyd_example.cpp") target_link_libraries(mesh_optimization_lloyd_example - PUBLIC CGAL::Eigen3_support) + PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_3D_image.cpp") - target_link_libraries(mesh_3D_image PUBLIC CGAL::Eigen3_support) + target_link_libraries(mesh_3D_image PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program( "mesh_3D_image_with_custom_initialization.cpp") target_link_libraries(mesh_3D_image_with_custom_initialization - PUBLIC CGAL::Eigen3_support) + PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program( "mesh_3D_gray_image_with_custom_initialization.cpp") target_link_libraries(mesh_3D_gray_image_with_custom_initialization - PUBLIC CGAL::Eigen3_support) + PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_3D_image_variable_size.cpp") target_link_libraries(mesh_3D_image_variable_size - PUBLIC CGAL::Eigen3_support) + PRIVATE CGAL::Eigen3_support) find_package(ITK NAMES ITK InsightToolkit QUIET COMPONENTS ITKCommon ITKThresholding ITKSmoothing ITKImageIntensity) @@ -174,11 +174,11 @@ if(TARGET CGAL::CGAL_ImageIO) create_single_source_cgal_program("mesh_3D_weighted_image.cpp") target_link_libraries(mesh_3D_weighted_image - PUBLIC CGAL::Eigen3_support CGAL::ITK_support) + PRIVATE CGAL::Eigen3_support CGAL::ITK_support) create_single_source_cgal_program("mesh_3D_weighted_image_with_detection_of_features.cpp") target_link_libraries(mesh_3D_weighted_image_with_detection_of_features - PUBLIC CGAL::Eigen3_support CGAL::ITK_support) + PRIVATE CGAL::Eigen3_support CGAL::ITK_support) else() message(STATUS "NOTICE: The examples that need ITK will not be compiled.") endif() @@ -219,7 +219,7 @@ if(CGAL_ACTIVATE_CONCURRENT_MESH_3 AND TARGET CGAL::TBB_support) mesh_polyhedral_domain_with_lipschitz_sizing mesh_two_implicit_spheres_with_balls) if(TARGET ${target}) - target_link_libraries(${target} PUBLIC CGAL::TBB_support) + target_link_libraries(${target} PRIVATE CGAL::TBB_support) endif() endforeach() endif() diff --git a/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index 3deb1f35b660..38df3832193d 100644 --- a/Mesh_3/test/Mesh_3/CMakeLists.txt +++ b/Mesh_3/test/Mesh_3/CMakeLists.txt @@ -89,7 +89,7 @@ foreach(target test_meshing_polyhedral_complex_with_manifold_and_min_size ) if(TARGET ${target}) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) endif() endforeach() @@ -115,7 +115,7 @@ if(TARGET CGAL::TBB_support) test_min_size_criteria ) if(TARGET ${target}) - target_link_libraries(${target} PUBLIC CGAL::TBB_support) + target_link_libraries(${target} PRIVATE CGAL::TBB_support) endif() endforeach() diff --git a/Nef_3/examples/Nef_3/CMakeLists.txt b/Nef_3/examples/Nef_3/CMakeLists.txt index f75cbdea24d6..6518c16a63a1 100644 --- a/Nef_3/examples/Nef_3/CMakeLists.txt +++ b/Nef_3/examples/Nef_3/CMakeLists.txt @@ -16,5 +16,5 @@ foreach(cppfile ${cppfiles}) endforeach() if(CGAL_Qt6_FOUND) - target_link_libraries(draw_nef_3 PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_nef_3 PRIVATE CGAL::CGAL_Basic_viewer) endif() diff --git a/NewKernel_d/test/NewKernel_d/CMakeLists.txt b/NewKernel_d/test/NewKernel_d/CMakeLists.txt index ac92d09a3a03..9bdfee783148 100644 --- a/NewKernel_d/test/NewKernel_d/CMakeLists.txt +++ b/NewKernel_d/test/NewKernel_d/CMakeLists.txt @@ -22,7 +22,7 @@ if(TARGET CGAL::Eigen3_support) foreach(cppfile ${cppfiles}) get_filename_component(target ${cppfile} NAME_WE) create_single_source_cgal_program("${cppfile}") - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) endforeach() else() message("NOTICE: These programs require the Eigen3 library, and will not be compiled.") diff --git a/Number_types/test/Number_types/CMakeLists.txt b/Number_types/test/Number_types/CMakeLists.txt index 339285db0d76..cf016a80eb99 100644 --- a/Number_types/test/Number_types/CMakeLists.txt +++ b/Number_types/test/Number_types/CMakeLists.txt @@ -83,7 +83,7 @@ if(NOT CGAL_DISABLE_GMP) find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if (TARGET CGAL::Eigen3_support) - target_link_libraries(test_eigen PUBLIC CGAL::Eigen3_support) + target_link_libraries(test_eigen PRIVATE CGAL::Eigen3_support) endif() else()#NOT CGAL_DISABLE_GMP message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.") diff --git a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt index 24d8eccb2a2d..3037ca8cb793 100644 --- a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt @@ -15,4 +15,4 @@ if(NOT TARGET CGAL::Eigen3_support) endif() create_single_source_cgal_program("bench_obb.cpp") -target_link_libraries(bench_obb PUBLIC CGAL::Eigen3_support) +target_link_libraries(bench_obb PRIVATE CGAL::Eigen3_support) diff --git a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt index 8fc0f22e1e56..816d10c0403d 100644 --- a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt @@ -18,5 +18,5 @@ create_single_source_cgal_program("obb_with_point_maps_example.cpp") create_single_source_cgal_program("rotated_aabb_tree_example.cpp") foreach(target obb_example obb_with_point_maps_example rotated_aabb_tree_example) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) endforeach() diff --git a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt index 2c11f89fac1b..760507a79dda 100644 --- a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt @@ -18,5 +18,5 @@ create_single_source_cgal_program("test_nelder_mead.cpp") create_single_source_cgal_program("test_optimization_algorithms.cpp") foreach(target test_OBB_traits test_nelder_mead test_optimization_algorithms) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) endforeach() diff --git a/Orthtree/examples/Orthtree/CMakeLists.txt b/Orthtree/examples/Orthtree/CMakeLists.txt index 476dfbfb5fcf..ff3377e59a43 100644 --- a/Orthtree/examples/Orthtree/CMakeLists.txt +++ b/Orthtree/examples/Orthtree/CMakeLists.txt @@ -22,5 +22,5 @@ find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) include(CGAL_Eigen_support) if (TARGET CGAL::Eigen_support) create_single_source_cgal_program("orthtree_build.cpp") - target_link_libraries(orthtree_build PUBLIC CGAL::Eigen_support) + target_link_libraries(orthtree_build PRIVATE CGAL::Eigen_support) endif() diff --git a/Periodic_2_triangulation_2/examples/Periodic_2_triangulation_2/CMakeLists.txt b/Periodic_2_triangulation_2/examples/Periodic_2_triangulation_2/CMakeLists.txt index 77b3ecbfc104..671221a301bc 100644 --- a/Periodic_2_triangulation_2/examples/Periodic_2_triangulation_2/CMakeLists.txt +++ b/Periodic_2_triangulation_2/examples/Periodic_2_triangulation_2/CMakeLists.txt @@ -16,5 +16,5 @@ foreach(cppfile ${cppfiles}) endforeach() if(CGAL_Qt6_FOUND) - target_link_libraries(draw_periodic_2_triangulation_2 PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_periodic_2_triangulation_2 PRIVATE CGAL::CGAL_Basic_viewer) endif() 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 4433ae373dce..1141a255ca41 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 @@ -30,5 +30,5 @@ foreach( mesh_implicit_shape_with_optimizers mesh_implicit_shape_with_features mesh_periodic_polyhedral_domain) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) endforeach() 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 1fb0f56e3968..aae24ad082f1 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 @@ -15,8 +15,8 @@ if(NOT TARGET CGAL::Eigen3_support) endif() create_single_source_cgal_program("test_implicit_shapes_bunch.cpp") -target_link_libraries(test_implicit_shapes_bunch PUBLIC CGAL::Eigen3_support) +target_link_libraries(test_implicit_shapes_bunch PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("test_implicit_shapes_with_features.cpp") -target_link_libraries(test_implicit_shapes_with_features PUBLIC CGAL::Eigen3_support) +target_link_libraries(test_implicit_shapes_with_features PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("test_triply_periodic_minimal_surfaces.cpp") -target_link_libraries(test_triply_periodic_minimal_surfaces PUBLIC CGAL::Eigen3_support) +target_link_libraries(test_triply_periodic_minimal_surfaces PRIVATE CGAL::Eigen3_support) diff --git a/Point_set_3/examples/Point_set_3/CMakeLists.txt b/Point_set_3/examples/Point_set_3/CMakeLists.txt index 95a6169ec510..a8246bf0f583 100644 --- a/Point_set_3/examples/Point_set_3/CMakeLists.txt +++ b/Point_set_3/examples/Point_set_3/CMakeLists.txt @@ -17,12 +17,12 @@ find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) 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) + target_link_libraries(point_set_algo PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: The example 'point_set_algo' requires the Eigen library, and will not be compiled.") endif() create_single_source_cgal_program("draw_point_set_3.cpp") if(CGAL_Qt6_FOUND) - target_link_libraries(draw_point_set_3 PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_point_set_3 PRIVATE CGAL::CGAL_Basic_viewer) endif() diff --git a/Point_set_3/test/Point_set_3/CMakeLists.txt b/Point_set_3/test/Point_set_3/CMakeLists.txt index 2546c7495a81..b2c092e2aadb 100644 --- a/Point_set_3/test/Point_set_3/CMakeLists.txt +++ b/Point_set_3/test/Point_set_3/CMakeLists.txt @@ -18,7 +18,7 @@ if(NOT MSVC_VERSION OR MSVC_VERSION GREATER_EQUAL 1919 OR MSVC_VERSION LESS 1910 find_package(LASLIB QUIET) include(CGAL_LASLIB_support) if (TARGET CGAL::LASLIB_support) - target_link_libraries(test_deprecated_io_ps PUBLIC CGAL::LASLIB_support) + target_link_libraries(test_deprecated_io_ps PRIVATE CGAL::LASLIB_support) else() message(STATUS "NOTICE: the LAS reader test requires LASlib, and will not be compiled.") endif() 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 a15b69cad1ab..af87a391aa7d 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 @@ -52,25 +52,25 @@ include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) # Executables that require Eigen create_single_source_cgal_program( "normal_estimation_test.cpp" ) - target_link_libraries(normal_estimation_test PUBLIC CGAL::Eigen3_support) + target_link_libraries(normal_estimation_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("hierarchy_simplification_test.cpp") - target_link_libraries(hierarchy_simplification_test PUBLIC CGAL::Eigen3_support) + target_link_libraries(hierarchy_simplification_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("smoothing_test.cpp") - target_link_libraries(smoothing_test PUBLIC CGAL::Eigen3_support) + target_link_libraries(smoothing_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("vcm_plane_test.cpp") - target_link_libraries(vcm_plane_test PUBLIC CGAL::Eigen3_support) + target_link_libraries(vcm_plane_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("vcm_all_test.cpp") - target_link_libraries(vcm_all_test PUBLIC CGAL::Eigen3_support) + target_link_libraries(vcm_all_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("jet_pointer_as_property_map.cpp") - target_link_libraries(jet_pointer_as_property_map PUBLIC CGAL::Eigen3_support) + target_link_libraries(jet_pointer_as_property_map PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("psp_jet_includes.cpp") - target_link_libraries(psp_jet_includes PUBLIC CGAL::Eigen3_support) + target_link_libraries(psp_jet_includes PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: Some tests require Eigen 3.1 (or greater), and will not be compiled.") endif() @@ -84,7 +84,7 @@ if(TARGET CGAL::TBB_support) wlop_simplify_and_regularize_test edge_aware_upsample_test normal_estimation_test) if(TARGET ${target}) - target_link_libraries(${target} PUBLIC CGAL::TBB_support) + target_link_libraries(${target} PRIVATE CGAL::TBB_support) endif() endforeach() else() 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 6d0b470175d1..2dcdf552ba33 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 @@ -24,13 +24,13 @@ include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) # Executables that require Eigen 3 create_single_source_cgal_program("poisson_reconstruction_example.cpp") - target_link_libraries(poisson_reconstruction_example PUBLIC CGAL::Eigen3_support) + target_link_libraries(poisson_reconstruction_example PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("poisson_reconstruction.cpp") - target_link_libraries(poisson_reconstruction PUBLIC CGAL::Eigen3_support) + target_link_libraries(poisson_reconstruction PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("poisson_reconstruction_function.cpp") - target_link_libraries(poisson_reconstruction_function PUBLIC CGAL::Eigen3_support) + target_link_libraries(poisson_reconstruction_function PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("tutorial_example.cpp") - target_link_libraries(tutorial_example PUBLIC CGAL::Eigen3_support) + target_link_libraries(tutorial_example PRIVATE CGAL::Eigen3_support) else() message("NOTICE: The examples require Eigen 3.1 (or greater) will not be compiled.") endif() 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 8e56915cacab..59190449031e 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 @@ -23,19 +23,19 @@ include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) # Executables that require Eigen 3.1 create_single_source_cgal_program("poisson_reconstruction_test_surface_mesher.cpp") - target_link_libraries(poisson_reconstruction_test_surface_mesher PUBLIC CGAL::Eigen3_support) + target_link_libraries(poisson_reconstruction_test_surface_mesher PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("poisson_reconstruction_test_mesh_3.cpp") - target_link_libraries(poisson_reconstruction_test_mesh_3 PUBLIC CGAL::Eigen3_support) + target_link_libraries(poisson_reconstruction_test_mesh_3 PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("compare_mesh_3_vs_Poisson_implicit_surface_3.cpp") - target_link_libraries(compare_mesh_3_vs_Poisson_implicit_surface_3 PUBLIC CGAL::Eigen3_support) + target_link_libraries(compare_mesh_3_vs_Poisson_implicit_surface_3 PRIVATE CGAL::Eigen3_support) find_package(TBB QUIET) include(CGAL_TBB_support) if (TBB_FOUND) create_single_source_cgal_program( "poisson_and_parallel_mesh_3.cpp" ) - target_link_libraries(poisson_and_parallel_mesh_3 PUBLIC CGAL::Eigen3_support CGAL::TBB_support) + target_link_libraries(poisson_and_parallel_mesh_3 PRIVATE CGAL::Eigen3_support CGAL::TBB_support) else() message(STATUS "NOTICE: The test 'poisson_and_parallel_mesh_3' requires TBB, and will not be compiled.") endif() diff --git a/Polygon/examples/Polygon/CMakeLists.txt b/Polygon/examples/Polygon/CMakeLists.txt index 4ecfb2332558..55e730612942 100644 --- a/Polygon/examples/Polygon/CMakeLists.txt +++ b/Polygon/examples/Polygon/CMakeLists.txt @@ -16,8 +16,8 @@ foreach(cppfile ${cppfiles}) endforeach() if(CGAL_Qt6_FOUND) - target_link_libraries(draw_polygon PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(draw_polygon_with_holes PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(draw_polygon_with_holes_2 PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(draw_multipolygon_with_holes PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_polygon PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_polygon_with_holes PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_polygon_with_holes_2 PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_multipolygon_with_holes PRIVATE CGAL::CGAL_Basic_viewer) endif() diff --git a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt index 2a75ff4b830c..bb3be52226a4 100644 --- a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt @@ -29,7 +29,7 @@ if (FAST_ENVELOPE_BUILD_DIR) endif() create_single_source_cgal_program("fastE.cpp") - target_link_libraries( fastE PUBLIC CGAL::Eigen3_support) + target_link_libraries( fastE PRIVATE CGAL::Eigen3_support) target_link_libraries( fastE PUBLIC FastEnvelope IndirectPredicates geogram) else() @@ -39,5 +39,5 @@ endif() create_single_source_cgal_program("fast.cpp") create_single_source_cgal_program("polygon_mesh_slicer.cpp") -target_link_libraries(polygon_mesh_slicer PUBLIC CGAL::Eigen3_support) +target_link_libraries(polygon_mesh_slicer PRIVATE CGAL::Eigen3_support) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt index b0958a8ff4f5..6f010df3bab4 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt @@ -63,33 +63,33 @@ find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) 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) + target_link_libraries(hole_filling_example PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("hole_filling_example_SM.cpp") - target_link_libraries(hole_filling_example_SM PUBLIC CGAL::Eigen3_support) + target_link_libraries(hole_filling_example_SM PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("hole_filling_visitor_example.cpp") - target_link_libraries(hole_filling_visitor_example PUBLIC CGAL::Eigen3_support) + target_link_libraries(hole_filling_visitor_example PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("refine_fair_example.cpp") - target_link_libraries(refine_fair_example PUBLIC CGAL::Eigen3_support) + target_link_libraries(refine_fair_example PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("shape_smoothing_example.cpp") - target_link_libraries(shape_smoothing_example PUBLIC CGAL::Eigen3_support) + target_link_libraries(shape_smoothing_example PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("hole_filling_example_LCC.cpp") - target_link_libraries(hole_filling_example_LCC PUBLIC CGAL::Eigen3_support) + target_link_libraries(hole_filling_example_LCC PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_smoothing_example.cpp") - target_link_libraries(mesh_smoothing_example PUBLIC CGAL::Eigen3_support) + target_link_libraries(mesh_smoothing_example PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("isotropic_remeshing_with_sizing_example.cpp") - target_link_libraries(isotropic_remeshing_with_sizing_example PUBLIC CGAL::Eigen3_support) + target_link_libraries(isotropic_remeshing_with_sizing_example PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("delaunay_remeshing_example.cpp") - target_link_libraries(delaunay_remeshing_example PUBLIC CGAL::Eigen3_support) + target_link_libraries(delaunay_remeshing_example PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("remesh_almost_planar_patches.cpp") - target_link_libraries(remesh_almost_planar_patches PUBLIC CGAL::Eigen3_support) + target_link_libraries(remesh_almost_planar_patches PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("geodesic_isolevel_refinement.cpp") - target_link_libraries(geodesic_isolevel_refinement PUBLIC CGAL::Eigen3_support) + target_link_libraries(geodesic_isolevel_refinement PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("interpolated_corrected_curvatures_SM.cpp") - target_link_libraries(interpolated_corrected_curvatures_SM PUBLIC CGAL::Eigen3_support) + target_link_libraries(interpolated_corrected_curvatures_SM PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("interpolated_corrected_curvatures_PH.cpp") - target_link_libraries(interpolated_corrected_curvatures_PH PUBLIC CGAL::Eigen3_support) + target_link_libraries(interpolated_corrected_curvatures_PH PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("interpolated_corrected_curvatures_vertex.cpp") - target_link_libraries(interpolated_corrected_curvatures_vertex PUBLIC CGAL::Eigen3_support) + target_link_libraries(interpolated_corrected_curvatures_vertex PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: Examples that use Eigen will not be compiled.") endif() @@ -126,7 +126,7 @@ endif() find_package(METIS QUIET) include(CGAL_METIS_support) if(TARGET CGAL::METIS_support) - target_link_libraries(hausdorff_bounded_error_distance_example PUBLIC CGAL::METIS_support) + target_link_libraries(hausdorff_bounded_error_distance_example PRIVATE CGAL::METIS_support) else() message(STATUS "NOTICE: Examples that use the METIS library will not be compiled.") endif() @@ -134,13 +134,13 @@ endif() find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) - target_link_libraries(self_intersections_example PUBLIC CGAL::TBB_support) - target_link_libraries(hausdorff_distance_remeshing_example PUBLIC CGAL::TBB_support) - target_link_libraries(hausdorff_bounded_error_distance_example PUBLIC CGAL::TBB_support) - target_link_libraries(soup_autorefinement PUBLIC CGAL::TBB_support) + target_link_libraries(self_intersections_example PRIVATE CGAL::TBB_support) + target_link_libraries(hausdorff_distance_remeshing_example PRIVATE CGAL::TBB_support) + target_link_libraries(hausdorff_bounded_error_distance_example PRIVATE CGAL::TBB_support) + target_link_libraries(soup_autorefinement PRIVATE CGAL::TBB_support) create_single_source_cgal_program("corefinement_parallel_union_meshes.cpp") - target_link_libraries(corefinement_parallel_union_meshes PUBLIC CGAL::TBB_support) + target_link_libraries(corefinement_parallel_union_meshes PRIVATE CGAL::TBB_support) else() message(STATUS "NOTICE: Intel TBB was not found. Sequential code will be used.") endif() @@ -148,7 +148,7 @@ endif() find_package(Ceres QUIET) include(CGAL_Ceres_support) if(TARGET CGAL::Ceres_support) - target_link_libraries(mesh_smoothing_example PUBLIC CGAL::Ceres_support) + target_link_libraries(mesh_smoothing_example PRIVATE CGAL::Ceres_support) else() message(STATUS "NOTICE: The example 'mesh_smoothing_example' uses the Ceres library, and will not be compiled.") endif() diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index 0ac926c0f30e..3d121cbe5109 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -73,21 +73,21 @@ find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) 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) + target_link_libraries(fairing_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("triangulate_hole_Polyhedron_3_no_delaunay_test.cpp") - target_link_libraries(triangulate_hole_Polyhedron_3_no_delaunay_test PUBLIC CGAL::Eigen3_support) + target_link_libraries(triangulate_hole_Polyhedron_3_no_delaunay_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("triangulate_hole_Polyhedron_3_test.cpp") - target_link_libraries(triangulate_hole_Polyhedron_3_test PUBLIC CGAL::Eigen3_support) + target_link_libraries(triangulate_hole_Polyhedron_3_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("test_shape_smoothing.cpp") - target_link_libraries(test_shape_smoothing PUBLIC CGAL::Eigen3_support) + target_link_libraries(test_shape_smoothing PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("delaunay_remeshing_test.cpp") - target_link_libraries(delaunay_remeshing_test PUBLIC CGAL::Eigen3_support) + target_link_libraries(delaunay_remeshing_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("test_interpolated_corrected_curvatures.cpp") - target_link_libraries(test_interpolated_corrected_curvatures PUBLIC CGAL::Eigen3_support) + target_link_libraries(test_interpolated_corrected_curvatures PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("test_decimation_of_planar_patches.cpp") - target_link_libraries(test_decimation_of_planar_patches PUBLIC CGAL::Eigen3_support) + target_link_libraries(test_decimation_of_planar_patches PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("remeshing_quality_test.cpp" ) - target_link_libraries(remeshing_quality_test PUBLIC CGAL::Eigen3_support) + target_link_libraries(remeshing_quality_test PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: Tests that use the Eigen library will not be compiled.") endif() @@ -95,7 +95,7 @@ endif() find_package(METIS QUIET) include(CGAL_METIS_support) if(TARGET CGAL::METIS_support) - target_link_libraries(test_hausdorff_bounded_error_distance PUBLIC CGAL::METIS_support) + target_link_libraries(test_hausdorff_bounded_error_distance PRIVATE CGAL::METIS_support) else() message(STATUS "NOTICE: Tests are not using METIS.") endif() @@ -103,11 +103,11 @@ endif() find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) - target_link_libraries(test_hausdorff_bounded_error_distance PUBLIC CGAL::TBB_support) - target_link_libraries(test_pmp_distance PUBLIC CGAL::TBB_support) - target_link_libraries(orient_polygon_soup_test PUBLIC CGAL::TBB_support) - target_link_libraries(self_intersection_surface_mesh_test PUBLIC CGAL::TBB_support) - target_link_libraries(test_autorefinement PUBLIC CGAL::TBB_support) + target_link_libraries(test_hausdorff_bounded_error_distance PRIVATE CGAL::TBB_support) + target_link_libraries(test_pmp_distance PRIVATE CGAL::TBB_support) + target_link_libraries(orient_polygon_soup_test PRIVATE CGAL::TBB_support) + target_link_libraries(self_intersection_surface_mesh_test PRIVATE CGAL::TBB_support) + target_link_libraries(test_autorefinement PRIVATE CGAL::TBB_support) else() message(STATUS "NOTICE: Intel TBB was not found. Tests will use sequential code.") endif() @@ -124,10 +124,10 @@ endif() find_package(Ceres QUIET) include(CGAL_Ceres_support) if(TARGET CGAL::Ceres_support AND TARGET CGAL::Eigen3_support) - target_link_libraries(test_mesh_smoothing PUBLIC CGAL::Eigen3_support CGAL::Ceres_support) + target_link_libraries(test_mesh_smoothing PRIVATE CGAL::Eigen3_support CGAL::Ceres_support) # target_compile_definitions(test_pmp_repair_self_intersections PUBLIC CGAL_PMP_USE_CERES_SOLVER) -# target_link_libraries(test_pmp_repair_self_intersections PUBLIC CGAL::Eigen3_support CGAL::Ceres_support) +# target_link_libraries(test_pmp_repair_self_intersections PRIVATE CGAL::Eigen3_support CGAL::Ceres_support) else() message(STATUS "NOTICE: Tests are not using Ceres.") endif() diff --git a/Polygon_repair/test/Polygon_repair/CMakeLists.txt b/Polygon_repair/test/Polygon_repair/CMakeLists.txt index 9c81f408cd5e..a1564d5dd162 100644 --- a/Polygon_repair/test/Polygon_repair/CMakeLists.txt +++ b/Polygon_repair/test/Polygon_repair/CMakeLists.txt @@ -20,6 +20,6 @@ create_single_source_cgal_program( "exact_test.cpp") create_single_source_cgal_program( "repair_polygon_2_test.cpp" ) if(CGAL_Qt6_FOUND) - target_link_libraries(draw_test_polygons PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(exact_test PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_test_polygons PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(exact_test PRIVATE CGAL::CGAL_Basic_viewer) endif() diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt index 77915e0f0092..c2a83f6adaf0 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt @@ -35,10 +35,10 @@ foreach( target polyfit_example_without_input_planes polyfit_example_user_provided_planes polyfit_example_model_complexity_control polyfit_example_with_region_growing) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) if(TARGET CGAL::SCIP_support) - target_link_libraries(${target} PUBLIC CGAL::SCIP_support) + target_link_libraries(${target} PRIVATE CGAL::SCIP_support) else() - target_link_libraries(${target} PUBLIC CGAL::GLPK_support) + target_link_libraries(${target} PRIVATE CGAL::GLPK_support) endif() endforeach() diff --git a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt index a47b82f430d9..343c6c9bf8f8 100644 --- a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt @@ -27,9 +27,9 @@ if(NOT TARGET CGAL::SCIP_support) endif() create_single_source_cgal_program("polygonal_surface_reconstruction_test.cpp") -target_link_libraries(polygonal_surface_reconstruction_test PUBLIC CGAL::Eigen3_support) +target_link_libraries(polygonal_surface_reconstruction_test PRIVATE CGAL::Eigen3_support) if(TARGET CGAL::SCIP_support) - target_link_libraries(polygonal_surface_reconstruction_test PUBLIC CGAL::SCIP_support) + target_link_libraries(polygonal_surface_reconstruction_test PRIVATE CGAL::SCIP_support) else() - target_link_libraries(polygonal_surface_reconstruction_test PUBLIC CGAL::GLPK_support) + target_link_libraries(polygonal_surface_reconstruction_test PRIVATE CGAL::GLPK_support) endif() diff --git a/Polyhedron/examples/Polyhedron/CMakeLists.txt b/Polyhedron/examples/Polyhedron/CMakeLists.txt index ff8058e94150..3bd3c35604f0 100644 --- a/Polyhedron/examples/Polyhedron/CMakeLists.txt +++ b/Polyhedron/examples/Polyhedron/CMakeLists.txt @@ -16,5 +16,5 @@ foreach(cppfile ${cppfiles}) endforeach() if(CGAL_Qt6_FOUND) - target_link_libraries(draw_polyhedron PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_polyhedron PRIVATE CGAL::CGAL_Basic_viewer) endif() diff --git a/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt index 924a2b07a37c..a7b0a40595bc 100644 --- a/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt @@ -22,5 +22,5 @@ file( foreach(cppfile ${cppfiles}) create_single_source_cgal_program("${cppfile}") get_filename_component(target ${cppfile} NAME_WE) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) endforeach() diff --git a/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt index b61fbc8b755e..5541cb45dffb 100644 --- a/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt @@ -22,5 +22,5 @@ file( foreach(cppfile ${cppfiles}) create_single_source_cgal_program("${cppfile}") get_filename_component(target ${cppfile} NAME_WE) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) endforeach() diff --git a/Property_map/examples/Property_map/CMakeLists.txt b/Property_map/examples/Property_map/CMakeLists.txt index 7a890baba134..79bb88628151 100644 --- a/Property_map/examples/Property_map/CMakeLists.txt +++ b/Property_map/examples/Property_map/CMakeLists.txt @@ -10,7 +10,7 @@ find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) 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) + target_link_libraries(custom_property_map PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: The example 'custom_property_map' requires Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index 7c9dac3523f6..ef3d5b1e90ff 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -12,11 +12,11 @@ if(TARGET CGAL::Eigen3_support) find_package(Boost COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) create_single_source_cgal_program(Compute_Ridges_Umbilics.cpp) - target_link_libraries(Compute_Ridges_Umbilics PUBLIC CGAL::Eigen3_support) + target_link_libraries(Compute_Ridges_Umbilics PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program(Ridges_Umbilics_SM.cpp) - target_link_libraries(Ridges_Umbilics_SM PUBLIC CGAL::Eigen3_support) + target_link_libraries(Ridges_Umbilics_SM PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program(Ridges_Umbilics_LCC.cpp) - target_link_libraries(Ridges_Umbilics_LCC PUBLIC CGAL::Eigen3_support) + target_link_libraries(Ridges_Umbilics_LCC PRIVATE CGAL::Eigen3_support) add_definitions("-DCGAL_USE_BOOST_PROGRAM_OPTIONS") if(TARGET Boost::program_options) diff --git a/Ridges_3/test/Ridges_3/CMakeLists.txt b/Ridges_3/test/Ridges_3/CMakeLists.txt index 5fe941c248be..9e7305e6953f 100644 --- a/Ridges_3/test/Ridges_3/CMakeLists.txt +++ b/Ridges_3/test/Ridges_3/CMakeLists.txt @@ -10,7 +10,7 @@ find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) 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) + target_link_libraries(ridge_test PRIVATE CGAL::Eigen3_support) else() message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/SMDS_3/test/SMDS_3/CMakeLists.txt b/SMDS_3/test/SMDS_3/CMakeLists.txt index 8f88df59ce48..75c24114c88c 100644 --- a/SMDS_3/test/SMDS_3/CMakeLists.txt +++ b/SMDS_3/test/SMDS_3/CMakeLists.txt @@ -26,7 +26,7 @@ if(TARGET CGAL::Eigen3_support) test_c3t3_extract_subdomains_boundaries test_c3t3_io_MEDIT) if(TARGET ${target}) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) endif() endforeach() else() diff --git a/STL_Extension/benchmark/compact_container_benchmark/CMakeLists.txt b/STL_Extension/benchmark/compact_container_benchmark/CMakeLists.txt index dca323d0a784..785873363e7e 100644 --- a/STL_Extension/benchmark/compact_container_benchmark/CMakeLists.txt +++ b/STL_Extension/benchmark/compact_container_benchmark/CMakeLists.txt @@ -10,5 +10,5 @@ create_single_source_cgal_program("cc_benchmark.cpp") if(TARGET CGAL::TBB_support) message(STATUS "Found TBB") - target_link_libraries(cc_benchmark PUBLIC CGAL::TBB_support) + target_link_libraries(cc_benchmark PRIVATE CGAL::TBB_support) endif() diff --git a/STL_Extension/test/STL_Extension/CMakeLists.txt b/STL_Extension/test/STL_Extension/CMakeLists.txt index 781a6285d451..7e47f6c07be6 100644 --- a/STL_Extension/test/STL_Extension/CMakeLists.txt +++ b/STL_Extension/test/STL_Extension/CMakeLists.txt @@ -22,7 +22,7 @@ create_single_source_cgal_program("test_composition.cpp") create_single_source_cgal_program("test_Concatenate_iterator.cpp") create_single_source_cgal_program("test_Concurrent_compact_container.cpp") if(TARGET CGAL::TBB_support) - target_link_libraries(test_Concurrent_compact_container PUBLIC CGAL::TBB_support) + target_link_libraries(test_Concurrent_compact_container PRIVATE CGAL::TBB_support) endif() create_single_source_cgal_program("test_dispatch_output.cpp") create_single_source_cgal_program("test_Flattening_iterator.cpp") @@ -36,7 +36,7 @@ create_single_source_cgal_program("test_multiset.cpp") create_single_source_cgal_program("test_cgal_named_params.cpp") add_executable(test_multiset_cc "test_multiset.cpp") -target_link_libraries(test_multiset_cc PUBLIC CGAL::CGAL) +target_link_libraries(test_multiset_cc PRIVATE CGAL::CGAL) target_compile_options(test_multiset_cc PUBLIC -DCGAL_MULTISET_USE_COMPACT_CONTAINER_AS_DEFAULT) cgal_add_test(test_multiset_cc) add_to_cached_list(CGAL_EXECUTABLE_TARGETS test_multiset_cc) @@ -58,7 +58,7 @@ create_single_source_cgal_program("test_fwd_make_array.cpp") if(TARGET CGAL::TBB_support) message(STATUS "Found TBB") - target_link_libraries(test_for_each PUBLIC CGAL::TBB_support) + target_link_libraries(test_for_each PRIVATE CGAL::TBB_support) endif() find_package(OpenMesh QUIET) 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 02feca0ab2c9..194a7c45a7ac 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 @@ -18,23 +18,23 @@ find_package(Eigen3 3.1.0 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) + target_link_libraries(scale_space PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("scale_space_sm.cpp") - target_link_libraries(scale_space_sm PUBLIC CGAL::Eigen3_support) + target_link_libraries(scale_space_sm PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("scale_space_incremental.cpp") - target_link_libraries(scale_space_incremental PUBLIC CGAL::Eigen3_support) + target_link_libraries(scale_space_incremental PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("scale_space_manifold.cpp") - target_link_libraries(scale_space_manifold PUBLIC CGAL::Eigen3_support) + target_link_libraries(scale_space_manifold PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("scale_space_advancing_front.cpp") - target_link_libraries(scale_space_advancing_front PUBLIC CGAL::Eigen3_support) + target_link_libraries(scale_space_advancing_front PRIVATE CGAL::Eigen3_support) if(ACTIVATE_CONCURRENCY AND TARGET CGAL::TBB_support) message(STATUS "Found TBB") - target_link_libraries(scale_space PUBLIC CGAL::TBB_support) - target_link_libraries(scale_space_incremental PUBLIC CGAL::TBB_support) - target_link_libraries(scale_space_manifold PUBLIC CGAL::TBB_support) - target_link_libraries(scale_space_advancing_front PUBLIC CGAL::TBB_support) + target_link_libraries(scale_space PRIVATE CGAL::TBB_support) + target_link_libraries(scale_space_incremental PRIVATE CGAL::TBB_support) + target_link_libraries(scale_space_manifold PRIVATE CGAL::TBB_support) + target_link_libraries(scale_space_advancing_front PRIVATE CGAL::TBB_support) endif() else() message("NOTICE: Examples require Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Shape_detection/benchmark/Shape_detection/CMakeLists.txt b/Shape_detection/benchmark/Shape_detection/CMakeLists.txt index 77e9dc7684f7..5b6beaced897 100644 --- a/Shape_detection/benchmark/Shape_detection/CMakeLists.txt +++ b/Shape_detection/benchmark/Shape_detection/CMakeLists.txt @@ -10,9 +10,9 @@ find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) 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) + target_link_libraries(benchmark_region_growing_on_point_set_2 PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("benchmark_region_growing_on_point_set_3.cpp") - target_link_libraries(benchmark_region_growing_on_point_set_3 PUBLIC CGAL::Eigen3_support) + target_link_libraries(benchmark_region_growing_on_point_set_3 PRIVATE CGAL::Eigen3_support) else() message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Shape_detection/examples/Shape_detection/CMakeLists.txt b/Shape_detection/examples/Shape_detection/CMakeLists.txt index 4a2cbea81839..bcbd16339b91 100644 --- a/Shape_detection/examples/Shape_detection/CMakeLists.txt +++ b/Shape_detection/examples/Shape_detection/CMakeLists.txt @@ -27,7 +27,7 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("region_growing_planes_on_polygon_mesh.cpp") add_executable(region_growing_planes_on_polyhedron region_growing_planes_on_polygon_mesh.cpp) target_compile_definitions(region_growing_planes_on_polyhedron PUBLIC -DUSE_POLYHEDRON) - target_link_libraries(region_growing_planes_on_polyhedron PUBLIC CGAL::CGAL CGAL::Eigen3_support) + target_link_libraries(region_growing_planes_on_polyhedron PRIVATE CGAL::CGAL CGAL::Eigen3_support) foreach( target @@ -42,6 +42,6 @@ if(TARGET CGAL::Eigen3_support) region_growing_planes_on_polygon_mesh region_growing_lines_on_segment_set) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) endforeach() endif() diff --git a/Shape_detection/test/Shape_detection/CMakeLists.txt b/Shape_detection/test/Shape_detection/CMakeLists.txt index 35abd070d587..34d6f1c0ad53 100644 --- a/Shape_detection/test/Shape_detection/CMakeLists.txt +++ b/Shape_detection/test/Shape_detection/CMakeLists.txt @@ -45,7 +45,7 @@ if(TARGET CGAL::Eigen3_support) test_region_growing_on_point_set_3_with_sorting test_region_growing_on_polygon_mesh_with_sorting test_region_growing_on_degenerated_mesh) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) endforeach() set(RANSAC_PROTO_DIR CACHE PATH "") diff --git a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt index 645499957d9c..58f2ab7b2b04 100644 --- a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt @@ -17,7 +17,7 @@ if(TARGET CGAL::OSQP_support) foreach(osqp_target ${osqp_targets}) create_single_source_cgal_program("${osqp_target}.cpp") if(TARGET ${osqp_target}) - target_link_libraries(${osqp_target} PUBLIC CGAL::OSQP_support) + target_link_libraries(${osqp_target} PRIVATE CGAL::OSQP_support) endif() endforeach() else() diff --git a/Shape_regularization/examples/Shape_regularization/CMakeLists.txt b/Shape_regularization/examples/Shape_regularization/CMakeLists.txt index 5e9bf84f85fd..ed0104fe41af 100644 --- a/Shape_regularization/examples/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/examples/Shape_regularization/CMakeLists.txt @@ -22,7 +22,7 @@ if(TARGET CGAL::OSQP_support) foreach(osqp_target ${osqp_targets}) create_single_source_cgal_program("${osqp_target}.cpp") if(TARGET ${osqp_target}) - target_link_libraries(${osqp_target} PUBLIC CGAL::OSQP_support) + target_link_libraries(${osqp_target} PRIVATE CGAL::OSQP_support) endif() endforeach() @@ -33,7 +33,7 @@ if(TARGET CGAL::OSQP_support) message(STATUS "Found Eigen") create_single_source_cgal_program("regularize_real_data_2.cpp") - target_link_libraries(regularize_real_data_2 PUBLIC CGAL::Eigen3_support CGAL::OSQP_support) + target_link_libraries(regularize_real_data_2 PRIVATE CGAL::Eigen3_support CGAL::OSQP_support) else() message(STATUS "NOTICE: Eigen was not found. Eigen examples won't be available.") endif() diff --git a/Shape_regularization/test/Shape_regularization/CMakeLists.txt b/Shape_regularization/test/Shape_regularization/CMakeLists.txt index beb23ce81e2a..02762c7aa8a0 100644 --- a/Shape_regularization/test/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/test/Shape_regularization/CMakeLists.txt @@ -28,7 +28,7 @@ if(TARGET CGAL::OSQP_support) foreach(osqp_target ${osqp_targets}) create_single_source_cgal_program("${osqp_target}.cpp") if(TARGET ${osqp_target}) - target_link_libraries(${osqp_target} PUBLIC CGAL::OSQP_support) + target_link_libraries(${osqp_target} PRIVATE CGAL::OSQP_support) endif() endforeach() else() diff --git a/Solver_interface/examples/Solver_interface/CMakeLists.txt b/Solver_interface/examples/Solver_interface/CMakeLists.txt index 10fc026e719e..f097c4238f36 100644 --- a/Solver_interface/examples/Solver_interface/CMakeLists.txt +++ b/Solver_interface/examples/Solver_interface/CMakeLists.txt @@ -11,11 +11,11 @@ find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) 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) + target_link_libraries(singular_value_decomposition PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("sparse_solvers.cpp") - target_link_libraries(sparse_solvers PUBLIC CGAL::Eigen3_support) + target_link_libraries(sparse_solvers PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("diagonalize_matrix.cpp") - target_link_libraries(diagonalize_matrix PUBLIC CGAL::Eigen3_support) + target_link_libraries(diagonalize_matrix PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: Eigen3 was not found. Some examples won't be available.") endif() @@ -26,7 +26,7 @@ if(TARGET CGAL::OSQP_support) message(STATUS "Found OSQP") create_single_source_cgal_program("osqp_quadratic_program.cpp") - target_link_libraries(osqp_quadratic_program PUBLIC CGAL::OSQP_support) + target_link_libraries(osqp_quadratic_program PRIVATE CGAL::OSQP_support) message(STATUS "OSQP found and used") else() message(STATUS "NOTICE: OSQP was not found. OSQP examples won't be available.") @@ -38,7 +38,7 @@ if(TARGET CGAL::SCIP_support) message(STATUS "Found SCIP") create_single_source_cgal_program("mixed_integer_program.cpp") - target_link_libraries(mixed_integer_program PUBLIC CGAL::SCIP_support) + target_link_libraries(mixed_integer_program PRIVATE CGAL::SCIP_support) message(STATUS "SCIP found and used") else() find_package(GLPK QUIET) @@ -47,7 +47,7 @@ else() message(STATUS "Found GLPK") create_single_source_cgal_program("mixed_integer_program.cpp") - target_link_libraries(mixed_integer_program PUBLIC CGAL::GLPK_support) + target_link_libraries(mixed_integer_program PRIVATE CGAL::GLPK_support) message(STATUS "GLPK found and used") else() message(STATUS "NOTICE: This project requires either SCIP or GLPK, and will not be compiled. " diff --git a/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt b/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt index 4aaf189118f4..f22da9331745 100644 --- a/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt @@ -46,5 +46,5 @@ foreach( sizeof # deque # see above ) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) endforeach() diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt index 18b828a05df4..587d9a232274 100644 --- a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -35,10 +35,10 @@ find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) 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) + target_link_libraries(fuzzy_range_query PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("general_neighbor_searching.cpp") - target_link_libraries(general_neighbor_searching PUBLIC CGAL::Eigen3_support) + target_link_libraries(general_neighbor_searching PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: The examples 'fuzzy_range_query' and 'general_neighbor_searching'") message(STATUS "will not be compiled as they use CGAL::Epick_d, which requires the Eigen library.") @@ -50,7 +50,7 @@ if(TARGET CGAL::TBB_support) message(STATUS "Found TBB") create_single_source_cgal_program("parallel_kdtree.cpp") - target_link_libraries(parallel_kdtree PUBLIC CGAL::TBB_support) + target_link_libraries(parallel_kdtree PRIVATE CGAL::TBB_support) else() message(STATUS "NOTICE: The example 'parallel_kdtree' requires TBB, and will not be compiled") endif() diff --git a/Spatial_sorting/examples/Spatial_sorting/CMakeLists.txt b/Spatial_sorting/examples/Spatial_sorting/CMakeLists.txt index bee8717e29d0..1fc5703e5b23 100644 --- a/Spatial_sorting/examples/Spatial_sorting/CMakeLists.txt +++ b/Spatial_sorting/examples/Spatial_sorting/CMakeLists.txt @@ -18,5 +18,5 @@ find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) message(STATUS "Found TBB") - target_link_libraries(parallel_spatial_sort_3 PUBLIC CGAL::TBB_support) + target_link_libraries(parallel_spatial_sort_3 PRIVATE CGAL::TBB_support) endif() diff --git a/Spatial_sorting/test/Spatial_sorting/CMakeLists.txt b/Spatial_sorting/test/Spatial_sorting/CMakeLists.txt index 57662ba95f7b..1aa81dc19290 100644 --- a/Spatial_sorting/test/Spatial_sorting/CMakeLists.txt +++ b/Spatial_sorting/test/Spatial_sorting/CMakeLists.txt @@ -13,5 +13,5 @@ find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) message(STATUS "Found TBB") - target_link_libraries(test_hilbert PUBLIC CGAL::TBB_support) + target_link_libraries(test_hilbert PRIVATE CGAL::TBB_support) endif() diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/CMakeLists.txt b/Straight_skeleton_2/examples/Straight_skeleton_2/CMakeLists.txt index 3a8820e61a0a..e5caf454fd7f 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/CMakeLists.txt +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/CMakeLists.txt @@ -15,12 +15,12 @@ foreach(cppfile ${cppfiles}) endforeach() if(CGAL_Qt6_FOUND) - target_link_libraries(draw_straight_skeleton_2 PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(exterior_offset_of_multiple_polygons_with_holes PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(Create_straight_skeleton_2 PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(Show_offset_polygon PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(Show_straight_skeleton PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(extrude_skeleton PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_straight_skeleton_2 PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(exterior_offset_of_multiple_polygons_with_holes PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(Create_straight_skeleton_2 PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(Show_offset_polygon PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(Show_straight_skeleton PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(extrude_skeleton PRIVATE CGAL::CGAL_Basic_viewer) else() message(STATUS "NOTICE: The example 'draw_straight_skeleton_2' requires Qt and will not be compiled.") endif() diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/CMakeLists.txt b/Straight_skeleton_2/test/Straight_skeleton_2/CMakeLists.txt index c7395c3cc446..cbc1776327c4 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/CMakeLists.txt +++ b/Straight_skeleton_2/test/Straight_skeleton_2/CMakeLists.txt @@ -17,8 +17,8 @@ create_single_source_cgal_program("test_sls_traits.cpp") create_single_source_cgal_program("test_straight_skeleton_copy.cpp") if(CGAL_Qt6_FOUND) - target_link_libraries(issue4684 PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(test_sls_previous_issues PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(issue4684 PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(test_sls_previous_issues PRIVATE CGAL::CGAL_Basic_viewer) endif() if (CGAL_Core_FOUND OR LEDA_FOUND) @@ -28,10 +28,10 @@ if (CGAL_Core_FOUND OR LEDA_FOUND) create_single_source_cgal_program("test_sls_weighted_polygons_with_holes.cpp") create_single_source_cgal_program("issue7149.cpp") if(CGAL_Qt6_FOUND) - target_link_libraries(issue7149 PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(issue7284 PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(test_sls_offset PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(test_sls_weighted_polygons_with_holes PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(issue7149 PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(issue7284 PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(test_sls_offset PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(test_sls_weighted_polygons_with_holes PRIVATE CGAL::CGAL_Basic_viewer) endif() else() message("NOTICE: Some test require CGAL_Core (or LEDA), and will not be compiled.") diff --git a/Straight_skeleton_extrusion_2/test/Straight_skeleton_extrusion_2/CMakeLists.txt b/Straight_skeleton_extrusion_2/test/Straight_skeleton_extrusion_2/CMakeLists.txt index 1c26729e3272..a2ed8ab65714 100644 --- a/Straight_skeleton_extrusion_2/test/Straight_skeleton_extrusion_2/CMakeLists.txt +++ b/Straight_skeleton_extrusion_2/test/Straight_skeleton_extrusion_2/CMakeLists.txt @@ -12,7 +12,7 @@ include_directories(BEFORE "include") if (CGAL_Core_FOUND OR LEDA_FOUND) create_single_source_cgal_program("test_sls_extrude.cpp") if(CGAL_Qt6_FOUND) - target_link_libraries(test_sls_extrude PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(test_sls_extrude PRIVATE CGAL::CGAL_Basic_viewer) endif() else() message("NOTICE: Tests require CGAL_Core (or LEDA), and will not be compiled.") diff --git a/Surface_mesh/examples/Surface_mesh/CMakeLists.txt b/Surface_mesh/examples/Surface_mesh/CMakeLists.txt index 4ecd528f219f..6b8821ccb12d 100644 --- a/Surface_mesh/examples/Surface_mesh/CMakeLists.txt +++ b/Surface_mesh/examples/Surface_mesh/CMakeLists.txt @@ -30,7 +30,7 @@ create_single_source_cgal_program("draw_surface_mesh.cpp") if(CGAL_Qt6_FOUND) #link it with the required CGAL libraries - target_link_libraries(draw_surface_mesh PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_surface_mesh PRIVATE CGAL::CGAL_Basic_viewer) endif() diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt index 35110d182d26..d45a9693351c 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt @@ -16,19 +16,19 @@ if(NOT TARGET CGAL::Eigen3_support) endif() create_single_source_cgal_program("vsa_approximation_2_example.cpp") -target_link_libraries(vsa_approximation_2_example PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_approximation_2_example PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("vsa_approximation_example.cpp") -target_link_libraries(vsa_approximation_example PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_approximation_example PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("vsa_class_interface_example.cpp") -target_link_libraries(vsa_class_interface_example PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_class_interface_example PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("vsa_isotropic_metric_example.cpp") -target_link_libraries(vsa_isotropic_metric_example PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_isotropic_metric_example PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("vsa_segmentation_example.cpp") -target_link_libraries(vsa_segmentation_example PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_segmentation_example PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("vsa_simple_approximation_example.cpp") -target_link_libraries(vsa_simple_approximation_example PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_simple_approximation_example PRIVATE CGAL::Eigen3_support) diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt index aefc4da29fa2..d085b8cec23c 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt @@ -16,31 +16,31 @@ if(NOT TARGET CGAL::Eigen3_support) endif() create_single_source_cgal_program("vsa_border_test.cpp") -target_link_libraries(vsa_border_test PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_border_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("vsa_class_interface_test.cpp") -target_link_libraries(vsa_class_interface_test PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_class_interface_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("vsa_correctness_test.cpp") -target_link_libraries(vsa_correctness_test PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_correctness_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("vsa_error_decrease_test.cpp") -target_link_libraries(vsa_error_decrease_test PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_error_decrease_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("vsa_kernel_test.cpp") -target_link_libraries(vsa_kernel_test PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_kernel_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("vsa_approximation_test.cpp") -target_link_libraries(vsa_approximation_test PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_approximation_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("vsa_segmentation_test.cpp") -target_link_libraries(vsa_segmentation_test PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_segmentation_test PRIVATE CGAL::Eigen3_support) #create_single_source_cgal_program("vsa_meshing_manifold_test.cpp") -#target_link_libraries(vsa_meshing_manifold_test PUBLIC CGAL::Eigen3_support) +#target_link_libraries(vsa_meshing_manifold_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("vsa_metric_test.cpp") -target_link_libraries(vsa_metric_test PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_metric_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("vsa_teleportation_test.cpp") -target_link_libraries(vsa_teleportation_test PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_teleportation_test PRIVATE CGAL::Eigen3_support) 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 e76761f97874..19d66a7b1a3b 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 @@ -7,7 +7,7 @@ find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) 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) + target_link_libraries(benchmark_for_concept_models PRIVATE CGAL::Eigen3_support) else() message("NOTICE: This program requires requires Eigen 3.1 (or greater) or later and will not be compiled.") endif() diff --git a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt index 98b5dc3c61f6..58874d3f2dca 100644 --- a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt @@ -12,7 +12,7 @@ find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) 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) + target_link_libraries(deform_mesh_for_botsch08_format PRIVATE CGAL::Eigen3_support) else() message("NOTICE: This program requires requires Eigen 3.1.91 (or greater) or later and will not be compiled.") endif() diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt index b6013ffce75d..bc5d23347f03 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt @@ -28,7 +28,7 @@ if(TARGET CGAL::Eigen3_support) k_ring_roi_translate_rotate_example k_ring_roi_translate_rotate_Surface_mesh deform_mesh_for_botsch08_format_sre_arap) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) endforeach() find_package(OpenMesh QUIET) diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt index e8819b7a22b3..b0c1b9bc196c 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt @@ -10,11 +10,11 @@ find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) 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) + target_link_libraries(Cactus_deformation_session PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("Cactus_performance_test.cpp") - target_link_libraries(Cactus_performance_test PUBLIC CGAL::Eigen3_support) + target_link_libraries(Cactus_performance_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("Symmetry_test.cpp") - target_link_libraries(Symmetry_test PUBLIC CGAL::Eigen3_support) + target_link_libraries(Symmetry_test PRIVATE CGAL::Eigen3_support) find_package(OpenMesh QUIET) if(OpenMesh_FOUND) diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt index 9315c25e2871..49fdcfc45697 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt @@ -44,21 +44,21 @@ if(TARGET CGAL::Eigen3_support) # ------------------------------------------------------------------ create_single_source_cgal_program("ARAP_parameterization.cpp") - target_link_libraries(ARAP_parameterization PUBLIC CGAL::Eigen3_support) + target_link_libraries(ARAP_parameterization PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("discrete_authalic.cpp") - target_link_libraries(discrete_authalic PUBLIC CGAL::Eigen3_support) + target_link_libraries(discrete_authalic PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("lscm.cpp") - target_link_libraries(lscm PUBLIC CGAL::Eigen3_support) + target_link_libraries(lscm PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("orbifold.cpp") - target_link_libraries(orbifold PUBLIC CGAL::Eigen3_support) + target_link_libraries(orbifold PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("seam_Polyhedron_3.cpp") - target_link_libraries(seam_Polyhedron_3 PUBLIC CGAL::Eigen3_support) + target_link_libraries(seam_Polyhedron_3 PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("simple_parameterization.cpp") - target_link_libraries(simple_parameterization PUBLIC CGAL::Eigen3_support) + target_link_libraries(simple_parameterization PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("square_border_parameterizer.cpp") - target_link_libraries(square_border_parameterizer PUBLIC CGAL::Eigen3_support) + target_link_libraries(square_border_parameterizer PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program( "iterative_authalic_parameterizer.cpp" ) - target_link_libraries(iterative_authalic_parameterizer PUBLIC CGAL::Eigen3_support) + target_link_libraries(iterative_authalic_parameterizer PRIVATE CGAL::Eigen3_support) if(SuiteSparse_FOUND) target_link_libraries(ARAP_parameterization PRIVATE ${SuiteSparse_LIBRARIES}) target_link_libraries(orbifold PRIVATE ${SuiteSparse_LIBRARIES}) diff --git a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt index 00278df2f7a4..36f681d45fd4 100644 --- a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt @@ -10,7 +10,7 @@ find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) 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) + target_link_libraries(extensive_parameterization_test PRIVATE CGAL::Eigen3_support) else() message("NOTICE: The tests require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt index 0f63efb7b068..384067e6005b 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt @@ -23,7 +23,7 @@ find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) 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) + target_link_libraries(edge_collapse_garland_heckbert PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: Garland-Heckbert polices require the Eigen library, which has not been found; related examples will not be compiled.") endif() @@ -48,7 +48,7 @@ if(TARGET CGAL::TBB_support AND TARGET CGAL::METIS_support) message(STATUS "Found METIS & TBB") create_single_source_cgal_program("collapse_small_edges_in_parallel.cpp") - target_link_libraries(collapse_small_edges_in_parallel PUBLIC CGAL::TBB_support CGAL::METIS_support) + target_link_libraries(collapse_small_edges_in_parallel PRIVATE CGAL::TBB_support CGAL::METIS_support) else() message(STATUS "NOTICE: The example 'collapse_small_edges_in_parallel' uses the METIS and TBB libraries, and will not be compiled.") endif() diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/test/Surface_mesh_simplification/CMakeLists.txt index cd3cee597296..6707d16ccd97 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/CMakeLists.txt @@ -18,7 +18,7 @@ find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) 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) + target_link_libraries(edge_collapse_garland_heckbert_variations PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: Garland-Heckbert polices require the Eigen library, which has not been found; related examples will not be compiled.") endif() diff --git a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt index 21b285a0b973..66e08127abd5 100644 --- a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt @@ -11,9 +11,9 @@ find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) 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) + target_link_libraries(solver_benchmark PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mcf_scale_invariance.cpp") - target_link_libraries(mcf_scale_invariance PUBLIC CGAL::Eigen3_support) + target_link_libraries(mcf_scale_invariance PRIVATE CGAL::Eigen3_support) else() message("NOTICE: This project requires Eigen 3.2.0 (or greater), and will not be compiled.") endif() diff --git a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt index 9b86386660b0..b5b8d4cd23f5 100644 --- a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt @@ -26,7 +26,7 @@ if(TARGET CGAL::Eigen3_support) MCF_Skeleton_sm_example MCF_Skeleton_LCC_example segmentation_example) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) endforeach() find_package(OpenMesh QUIET) @@ -35,7 +35,7 @@ if(TARGET CGAL::Eigen3_support) message(STATUS "Found OpenMesh") create_single_source_cgal_program("MCF_Skeleton_om_example.cpp") - target_link_libraries(MCF_Skeleton_om_example PUBLIC CGAL::Eigen3_support PRIVATE CGAL::OpenMesh_support) + target_link_libraries(MCF_Skeleton_om_example PRIVATE CGAL::Eigen3_support CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() diff --git a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt index 86bc2ec13285..cfbd1507754e 100644 --- a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt @@ -10,9 +10,9 @@ find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) 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) + target_link_libraries(MCF_Skeleton_test PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("skeleton_connectivity_test.cpp") - target_link_libraries(skeleton_connectivity_test PUBLIC CGAL::Eigen3_support) + target_link_libraries(skeleton_connectivity_test PRIVATE CGAL::Eigen3_support) else() message("NOTICE: These tests require the Eigen library (3.2 or greater), and will not be compiled.") endif() diff --git a/Surface_mesh_topology/examples/Surface_mesh_topology/CMakeLists.txt b/Surface_mesh_topology/examples/Surface_mesh_topology/CMakeLists.txt index c176292dfab6..d061af881979 100644 --- a/Surface_mesh_topology/examples/Surface_mesh_topology/CMakeLists.txt +++ b/Surface_mesh_topology/examples/Surface_mesh_topology/CMakeLists.txt @@ -32,17 +32,17 @@ foreach(cppfile ${SOURCE_FILES}) endforeach() if(CGAL_Qt6_FOUND) - target_link_libraries(edgewidth_lcc PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(edgewidth_surface_mesh PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(facewidth PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(open_path_homotopy PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(path_homotopy PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(path_homotopy_double_torus PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(path_homotopy_torus PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(path_homotopy_with_sm_and_polyhedron PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(path_simplicity_double_torus PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(path_simplicity_double_torus_2 PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(shortest_noncontractible_cycle_2 PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(shortest_noncontractible_cycle PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(unsew_edgewidth_repeatedly PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(edgewidth_lcc PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(edgewidth_surface_mesh PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(facewidth PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(open_path_homotopy PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(path_homotopy PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(path_homotopy_double_torus PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(path_homotopy_torus PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(path_homotopy_with_sm_and_polyhedron PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(path_simplicity_double_torus PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(path_simplicity_double_torus_2 PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(shortest_noncontractible_cycle_2 PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(shortest_noncontractible_cycle PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(unsew_edgewidth_repeatedly PRIVATE CGAL::CGAL_Basic_viewer) endif() diff --git a/Surface_mesh_topology/test/Surface_mesh_topology/CMakeLists.txt b/Surface_mesh_topology/test/Surface_mesh_topology/CMakeLists.txt index bd8dd2a9535e..415d36cb6378 100644 --- a/Surface_mesh_topology/test/Surface_mesh_topology/CMakeLists.txt +++ b/Surface_mesh_topology/test/Surface_mesh_topology/CMakeLists.txt @@ -34,8 +34,8 @@ foreach(cppfile ${SOURCE_FILES}) endforeach() if(CGAL_Qt6_FOUND) - target_link_libraries(fundamental_group_of_the_circle PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(fundamental_group_of_the_torus PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(path_with_rle_deformation_tests PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(test_homotopy PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(fundamental_group_of_the_circle PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(fundamental_group_of_the_torus PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(path_with_rle_deformation_tests PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(test_homotopy PRIVATE CGAL::CGAL_Basic_viewer) endif() diff --git a/Surface_sweep_2/test/Surface_sweep_2/CMakeLists.txt b/Surface_sweep_2/test/Surface_sweep_2/CMakeLists.txt index ae1336034cb9..4cf76b876815 100644 --- a/Surface_sweep_2/test/Surface_sweep_2/CMakeLists.txt +++ b/Surface_sweep_2/test/Surface_sweep_2/CMakeLists.txt @@ -20,9 +20,9 @@ function(compile name source_file point_location traits) add_executable(${name} ${source_file}) add_to_cached_list(CGAL_EXECUTABLE_TARGETS ${name}) if(TARGET CGAL::CGAL_Core) - target_link_libraries(${name} CGAL::CGAL CGAL::CGAL_Core) + target_link_libraries(${name} PRIVATE CGAL::CGAL CGAL::CGAL_Core) else() - target_link_libraries(${name} CGAL::CGAL) + target_link_libraries(${name} PRIVATE CGAL::CGAL) endif() target_compile_definitions( ${name} PRIVATE -DCGAL_ARR_TEST_POINT_LOCATION=${point_location} diff --git a/TDS_3/test/TDS_3/CMakeLists.txt b/TDS_3/test/TDS_3/CMakeLists.txt index 887a97215fba..5cca940fe982 100644 --- a/TDS_3/test/TDS_3/CMakeLists.txt +++ b/TDS_3/test/TDS_3/CMakeLists.txt @@ -13,5 +13,5 @@ create_single_source_cgal_program("test_io_tds3.cpp") if(TARGET CGAL::TBB_support) message(STATUS "Found TBB") - target_link_libraries(test_triangulation_tds_3 PUBLIC CGAL::TBB_support) + target_link_libraries(test_triangulation_tds_3 PRIVATE CGAL::TBB_support) endif() diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt index 4a1e6db6cc7f..ed6255c74758 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt @@ -29,19 +29,19 @@ find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) 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) + target_link_libraries(mesh_and_remesh_polyhedral_domain_with_features PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("mesh_and_remesh_c3t3.cpp") - target_link_libraries(mesh_and_remesh_c3t3 PUBLIC CGAL::Eigen3_support) + target_link_libraries(mesh_and_remesh_c3t3 PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program( "mesh_and_remesh_with_adaptive_sizing.cpp") - target_link_libraries(mesh_and_remesh_with_adaptive_sizing PUBLIC CGAL::Eigen3_support) + target_link_libraries(mesh_and_remesh_with_adaptive_sizing PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program( "mesh_and_remesh_with_sizing.cpp") - target_link_libraries(mesh_and_remesh_with_sizing PUBLIC CGAL::Eigen3_support) + target_link_libraries(mesh_and_remesh_with_sizing PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("tetrahedral_remeshing_with_features_and_sizing.cpp") - target_link_libraries(tetrahedral_remeshing_with_features_and_sizing PUBLIC CGAL::Eigen3_support) + target_link_libraries(tetrahedral_remeshing_with_features_and_sizing PRIVATE CGAL::Eigen3_support) if(CGAL_ACTIVATE_CONCURRENT_MESH_3 AND TARGET CGAL::TBB_support) message(STATUS "Found TBB") diff --git a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt index 37afbe1c7a5c..1e4d38d7a86d 100644 --- a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt @@ -20,7 +20,7 @@ create_single_source_cgal_program("test_tetrahedral_remeshing_from_mesh_file.cpp # Test MLS projection add_executable(test_tetrahedral_remeshing_mls "test_tetrahedral_remeshing.cpp") -target_link_libraries(test_tetrahedral_remeshing_mls PUBLIC CGAL::CGAL CGAL::Data) +target_link_libraries(test_tetrahedral_remeshing_mls PRIVATE CGAL::CGAL CGAL::Data) target_compile_definitions(test_tetrahedral_remeshing_mls PUBLIC -DCGAL_TET_REMESHING_SMOOTHING_WITH_MLS) cgal_add_test(test_tetrahedral_remeshing_mls) @@ -31,26 +31,26 @@ find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) 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) + target_link_libraries(test_mesh_and_remesh_polyhedron_with_features PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("test_mesh_and_remesh_with_sizing_field.cpp") - target_link_libraries(test_mesh_and_remesh_with_sizing_field PUBLIC CGAL::Eigen3_support) + target_link_libraries(test_mesh_and_remesh_with_sizing_field PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("features_and_adaptive_sizing.cpp") - target_link_libraries(features_and_adaptive_sizing PUBLIC CGAL::Eigen3_support) + target_link_libraries(features_and_adaptive_sizing PRIVATE CGAL::Eigen3_support) # with MLS projection add_executable(test_mesh_and_remesh_polyhedron_with_features_mls "test_mesh_and_remesh_polyhedron_with_features.cpp") target_link_libraries(test_mesh_and_remesh_polyhedron_with_features_mls - PUBLIC CGAL::CGAL CGAL::Data CGAL::Eigen3_support) + PRIVATE CGAL::CGAL CGAL::Data CGAL::Eigen3_support) target_compile_definitions(test_mesh_and_remesh_polyhedron_with_features_mls PUBLIC -DCGAL_TET_REMESHING_SMOOTHING_WITH_MLS) cgal_add_test(test_mesh_and_remesh_polyhedron_with_features_mls) if(CGAL_ImageIO_USE_ZLIB) create_single_source_cgal_program("test_mesh_and_remesh_image.cpp") - target_link_libraries(test_mesh_and_remesh_image PUBLIC CGAL::Eigen3_support) + target_link_libraries(test_mesh_and_remesh_image PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: The test 'test_mesh_and_remesh_image' uses zlib, and will not be compiled.") endif() diff --git a/Triangulation/applications/Triangulation/CMakeLists.txt b/Triangulation/applications/Triangulation/CMakeLists.txt index 034a38fa6974..262c38e3bda3 100644 --- a/Triangulation/applications/Triangulation/CMakeLists.txt +++ b/Triangulation/applications/Triangulation/CMakeLists.txt @@ -18,6 +18,6 @@ endif() include_directories(BEFORE include) create_single_source_cgal_program("points_to_RT_to_off.cpp") -target_link_libraries(points_to_RT_to_off PUBLIC CGAL::Eigen3_support) +target_link_libraries(points_to_RT_to_off PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("points_to_DT_to_off.cpp") -target_link_libraries(points_to_DT_to_off PUBLIC CGAL::Eigen3_support) +target_link_libraries(points_to_DT_to_off PRIVATE CGAL::Eigen3_support) diff --git a/Triangulation/benchmark/Triangulation/CMakeLists.txt b/Triangulation/benchmark/Triangulation/CMakeLists.txt index 9737bcc99c69..0abb1fc41f91 100644 --- a/Triangulation/benchmark/Triangulation/CMakeLists.txt +++ b/Triangulation/benchmark/Triangulation/CMakeLists.txt @@ -12,9 +12,9 @@ if(TARGET CGAL::Eigen3_support) include_directories(BEFORE "include") create_single_source_cgal_program("delaunay.cpp") - target_link_libraries(delaunay PUBLIC CGAL::Eigen3_support) + target_link_libraries(delaunay PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program("Td_vs_T2_and_T3.cpp") - target_link_libraries(Td_vs_T2_and_T3 PUBLIC CGAL::Eigen3_support) + target_link_libraries(Td_vs_T2_and_T3 PRIVATE CGAL::Eigen3_support) else() message("NOTICE: Executables in this directory require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Triangulation/examples/Triangulation/CMakeLists.txt b/Triangulation/examples/Triangulation/CMakeLists.txt index bf1fcf87fb30..44e2a96f1e02 100644 --- a/Triangulation/examples/Triangulation/CMakeLists.txt +++ b/Triangulation/examples/Triangulation/CMakeLists.txt @@ -31,7 +31,7 @@ if(TARGET CGAL::Eigen3_support) triangulation triangulation_data_structure_dynamic triangulation_data_structure_static) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) endforeach() else() message("NOTICE: Examples in this directory require Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Triangulation/test/Triangulation/CMakeLists.txt b/Triangulation/test/Triangulation/CMakeLists.txt index 03a5deff1659..ed03cdab9001 100644 --- a/Triangulation/test/Triangulation/CMakeLists.txt +++ b/Triangulation/test/Triangulation/CMakeLists.txt @@ -26,7 +26,7 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("issue_8347.cpp") foreach(target test_triangulation test_delaunay test_regular test_tds test_torture test_insert_if_in_star simple_io_test issue_8347) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) endforeach() else() diff --git a/Triangulation_2/examples/Triangulation_2/CMakeLists.txt b/Triangulation_2/examples/Triangulation_2/CMakeLists.txt index 3e3aafa5f56a..2e2b15634afb 100644 --- a/Triangulation_2/examples/Triangulation_2/CMakeLists.txt +++ b/Triangulation_2/examples/Triangulation_2/CMakeLists.txt @@ -16,10 +16,10 @@ foreach(cppfile ${cppfiles}) endforeach() if(CGAL_Qt6_FOUND) - target_link_libraries(constrained PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(draw_triangulation_2 PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(polygon_triangulation PUBLIC CGAL::CGAL_Basic_viewer) - target_link_libraries(star_conflict_zone PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(constrained PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_triangulation_2 PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(polygon_triangulation PRIVATE CGAL::CGAL_Basic_viewer) + target_link_libraries(star_conflict_zone PRIVATE CGAL::CGAL_Basic_viewer) else() message(STATUS "NOTICE: Several examples require Qt6 and will not be compiled.") endif() diff --git a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt index 2333c9a9ffcd..4cfc223e677e 100644 --- a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt @@ -57,7 +57,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) target_link_libraries(T3_demo PRIVATE CGAL::CGAL CGAL::CGAL_Qt6) target_link_libraries(T3_demo PRIVATE Qt6::OpenGL) if(TARGET CGAL::TBB_support) - target_link_libraries(T3_demo PUBLIC CGAL::TBB_support) + target_link_libraries(T3_demo PRIVATE CGAL::TBB_support) endif() include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index 62631b150e2d..dd50b2ada79e 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -24,7 +24,7 @@ create_single_source_cgal_program("simplex.cpp") create_single_source_cgal_program("draw_triangulation_3.cpp") if(CGAL_Qt6_FOUND) - target_link_libraries(draw_triangulation_3 PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_triangulation_3 PRIVATE CGAL::CGAL_Basic_viewer) else() message(STATUS "NOTICE: The example 'draw_triangulation_3' requires Qt6, and will not be compiled.") endif() @@ -38,9 +38,9 @@ if(TARGET CGAL::TBB_support) create_single_source_cgal_program("parallel_insertion_and_removal_in_regular_3.cpp") create_single_source_cgal_program("parallel_insertion_in_delaunay_3.cpp") create_single_source_cgal_program("sequential_parallel.cpp") - target_link_libraries(parallel_insertion_and_removal_in_regular_3 PUBLIC CGAL::TBB_support) - target_link_libraries(parallel_insertion_in_delaunay_3 PUBLIC CGAL::TBB_support) - target_link_libraries(sequential_parallel PUBLIC CGAL::TBB_support) + target_link_libraries(parallel_insertion_and_removal_in_regular_3 PRIVATE CGAL::TBB_support) + target_link_libraries(parallel_insertion_in_delaunay_3 PRIVATE CGAL::TBB_support) + target_link_libraries(sequential_parallel PRIVATE CGAL::TBB_support) if(CGAL_ENABLE_TESTING) set_property(TEST diff --git a/Triangulation_3/test/Triangulation_3/CMakeLists.txt b/Triangulation_3/test/Triangulation_3/CMakeLists.txt index 31da9b483204..b90ecd55af3b 100644 --- a/Triangulation_3/test/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/test/Triangulation_3/CMakeLists.txt @@ -38,7 +38,7 @@ if(TARGET CGAL::TBB_support) foreach(target test_delaunay_3 test_regular_3 test_regular_insert_range_with_info) - target_link_libraries(${target} PUBLIC CGAL::TBB_support) + target_link_libraries(${target} PRIVATE CGAL::TBB_support) endforeach() if(CGAL_ENABLE_TESTING) 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 79beea09c1e2..6120e72d3732 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 @@ -22,7 +22,7 @@ find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) 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) + target_link_libraries(test_dtos_dual PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: The Eigen library was not found. The test 'test_dtos_dual' will not be compiled.") endif() diff --git a/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt b/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt index 2d826a426b15..a0c18e3d250d 100644 --- a/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt +++ b/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt @@ -16,7 +16,7 @@ foreach(cppfile ${cppfiles}) endforeach() if(CGAL_Qt6_FOUND) - target_link_libraries(draw_voronoi_diagram_2 PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(draw_voronoi_diagram_2 PRIVATE CGAL::CGAL_Basic_viewer) else() message(STATUS "NOTICE: The Qt6 library was not found. The example 'draw_voronoi_diagram_2' will not be compiled.") endif() diff --git a/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt b/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt index 1675ac213345..de9e0f7256ed 100644 --- a/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt +++ b/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt @@ -16,7 +16,7 @@ find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) 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) + target_link_libraries(vda_tos2 PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: The Eigen library was not found. The test 'vda_tos2' will not be available.") endif() diff --git a/Weights/examples/Weights/CMakeLists.txt b/Weights/examples/Weights/CMakeLists.txt index d8218de53810..629ba82340df 100644 --- a/Weights/examples/Weights/CMakeLists.txt +++ b/Weights/examples/Weights/CMakeLists.txt @@ -15,7 +15,7 @@ find_package(Eigen3 3.1.0 QUIET) # (requires 3.1.0 or greater) 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) + target_link_libraries(weighted_laplacian PRIVATE CGAL::Eigen3_support) else() message(STATUS "NOTICE: The example 'weighted_laplacian' requires the Eigen library, and will not be compiled.") endif() From 63928f50908ff47d7bc66ff0b184968f7ddeeaad Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 8 Oct 2024 17:10:02 +0100 Subject: [PATCH 02/29] Eigen_support -> Eigen3_support (concerns kinetic @soesau) --- .../examples/Kinetic_space_partition/CMakeLists.txt | 2 +- .../test/Kinetic_space_partition/CMakeLists.txt | 2 +- .../examples/Kinetic_surface_reconstruction/CMakeLists.txt | 2 +- .../test/Kinetic_surface_reconstruction/CMakeLists.txt | 2 +- Orthtree/examples/Orthtree/CMakeLists.txt | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt b/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt index 2c61e71ecb0b..e78ac989659c 100644 --- a/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt +++ b/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt @@ -17,7 +17,7 @@ if(Eigen3_FOUND) foreach(target ${targets}) create_single_source_cgal_program("${target}.cpp") - target_link_libraries(${target} PRIVATE CGAL::Eigen_support) + target_link_libraries(${target} PRIVATE 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 39ac1e88597d..2a8dcd0c6dbb 100644 --- a/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt +++ b/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt @@ -27,7 +27,7 @@ if(Boost_FOUND) 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_link_libraries(${target} PUBLIC ${project_linked_libraries} CGAL::Eigen3_support) target_compile_definitions(${target} PUBLIC ${project_compilation_definitions}) endif() endforeach() diff --git a/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt b/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt index 932827cf0549..2bfd8cbc41b2 100644 --- a/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt +++ b/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt @@ -17,7 +17,7 @@ if(Eigen3_FOUND) foreach(target ${targets}) create_single_source_cgal_program("${target}.cpp") - target_link_libraries(${target} PRIVATE CGAL::Eigen_support) + target_link_libraries(${target} PRIVATE 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 64b499f53154..4212c2866cde 100644 --- a/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt +++ b/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt @@ -17,7 +17,7 @@ if(Eigen3_FOUND) foreach(target ${targets}) create_single_source_cgal_program("${target}.cpp") - target_link_libraries(${target} PRIVATE CGAL::Eigen_support) + target_link_libraries(${target} PRIVATE 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 ff3377e59a43..263619217b07 100644 --- a/Orthtree/examples/Orthtree/CMakeLists.txt +++ b/Orthtree/examples/Orthtree/CMakeLists.txt @@ -20,7 +20,7 @@ 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) +if (TARGET CGAL::Eigen3_support) create_single_source_cgal_program("orthtree_build.cpp") - target_link_libraries(orthtree_build PRIVATE CGAL::Eigen_support) + target_link_libraries(orthtree_build PRIVATE CGAL::Eigen3_support) endif() From eaa2dfc4561c3e4d4e36a0633a78467f6717dc7e Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 8 Oct 2024 17:20:08 +0100 Subject: [PATCH 03/29] Eigen_support -> Eigen3_support (concerns kinetic @soesau) --- .../examples/Kinetic_space_partition/CMakeLists.txt | 2 +- .../test/Kinetic_space_partition/CMakeLists.txt | 2 +- .../examples/Kinetic_surface_reconstruction/CMakeLists.txt | 2 +- .../test/Kinetic_surface_reconstruction/CMakeLists.txt | 2 +- Orthtree/examples/Orthtree/CMakeLists.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt b/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt index e78ac989659c..0ae368020c15 100644 --- a/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt +++ b/Kinetic_space_partition/examples/Kinetic_space_partition/CMakeLists.txt @@ -11,7 +11,7 @@ include(CGAL_CreateSingleSourceCGALProgram) find_package(Eigen3 3.1.0 REQUIRED) if(Eigen3_FOUND) message(STATUS "Found Eigen") - include(CGAL_Eigen_support) + include(CGAL_Eigen3_support) set(targets kinetic_partition) diff --git a/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt b/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt index 2a8dcd0c6dbb..9edaaea2384b 100644 --- a/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt +++ b/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt @@ -17,7 +17,7 @@ if(Boost_FOUND) find_package(Eigen3 3.1.0 REQUIRED) if(Eigen3_FOUND) message(STATUS "Found Eigen") - include(CGAL_Eigen_support) + include(CGAL_Eigen3_support) set(targets kinetic_3d_test_all) diff --git a/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt b/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt index 2bfd8cbc41b2..5445891abb0a 100644 --- a/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt +++ b/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/CMakeLists.txt @@ -11,7 +11,7 @@ include(CGAL_CreateSingleSourceCGALProgram) find_package(Eigen3 3.1.0 REQUIRED) if(Eigen3_FOUND) message(STATUS "Found Eigen") - include(CGAL_Eigen_support) + include(CGAL_Eigen3_support) set(targets ksr_basic ksr_building ksr_parameters) diff --git a/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt b/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt index 4212c2866cde..bf6b5fc9d132 100644 --- a/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt +++ b/Kinetic_surface_reconstruction/test/Kinetic_surface_reconstruction/CMakeLists.txt @@ -11,7 +11,7 @@ include(CGAL_CreateSingleSourceCGALProgram) find_package(Eigen3 3.1.0 REQUIRED) if(Eigen3_FOUND) message(STATUS "Found Eigen") - include(CGAL_Eigen_support) + include(CGAL_Eigen3_support) set(targets ksr_test ksr_reorientation ksr_regularization) diff --git a/Orthtree/examples/Orthtree/CMakeLists.txt b/Orthtree/examples/Orthtree/CMakeLists.txt index 263619217b07..d3f055198e07 100644 --- a/Orthtree/examples/Orthtree/CMakeLists.txt +++ b/Orthtree/examples/Orthtree/CMakeLists.txt @@ -19,7 +19,7 @@ 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) +include(CGAL_Eigen3_support) if (TARGET CGAL::Eigen3_support) create_single_source_cgal_program("orthtree_build.cpp") target_link_libraries(orthtree_build PRIVATE CGAL::Eigen3_support) From 59903f107fbffd1ebdd1f57899f845a7365191cc Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 8 Oct 2024 22:19:57 +0100 Subject: [PATCH 04/29] I guess this was before inherited from one of the item classes @lrineau --- Lab/demo/Lab/Plugins/PCA/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lab/demo/Lab/Plugins/PCA/CMakeLists.txt b/Lab/demo/Lab/Plugins/PCA/CMakeLists.txt index 3ede90fe82b6..1311f8a77a52 100644 --- a/Lab/demo/Lab/Plugins/PCA/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/PCA/CMakeLists.txt @@ -31,7 +31,7 @@ cgal_lab_plugin(create_obb_mesh_plugin Create_obb_mesh_plugin) target_link_libraries(create_obb_mesh_plugin PUBLIC scene_surface_mesh_item scene_polygon_soup_item scene_selection_item - scene_points_with_normal_item) + scene_points_with_normal_item CGAL::Eigen3_support) qt6_wrap_ui(volumesUI_FILES Basic_generator_widget.ui) cgal_lab_plugin( From ad8ece612df4e5a00393b319265c47ff98be0a4a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 8 Oct 2024 22:45:25 +0100 Subject: [PATCH 05/29] more plugins depend on Eigen --- Combinatorial_map/test/Combinatorial_map/CMakeLists.txt | 4 ++-- .../test/Kinetic_space_partition/CMakeLists.txt | 4 ++-- Lab/demo/Lab/Plugins/Display/CMakeLists.txt | 3 ++- Lab/demo/Lab/Plugins/PMP/CMakeLists.txt | 3 ++- Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt | 2 +- .../test/Point_set_processing_3/CMakeLists.txt | 4 ++-- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt index 8df873f5de3d..b83c3b00df43 100644 --- a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt +++ b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt @@ -16,12 +16,12 @@ create_single_source_cgal_program(Combinatorial_map_copy_test.cpp ${hfiles}) # Same targets, defining USE_COMPACT_CONTAINER_WITH_INDEX to test index version add_executable(Combinatorial_map_test_index Combinatorial_map_test.cpp ${hfiles}) target_compile_definitions(Combinatorial_map_test_index PUBLIC USE_COMPACT_CONTAINER_WITH_INDEX) -target_link_libraries(Combinatorial_map_test_index PUBLIC CGAL CGAL::Data) +target_link_libraries(Combinatorial_map_test_index PRIVATE CGAL::CGAL CGAL::Data) cgal_add_compilation_test(Combinatorial_map_test_index) add_executable(Combinatorial_map_copy_test_index Combinatorial_map_copy_test.cpp ${hfiles}) target_compile_definitions(Combinatorial_map_copy_test_index PUBLIC USE_COMPACT_CONTAINER_WITH_INDEX) -target_link_libraries(Combinatorial_map_copy_test_index PUBLIC CGAL CGAL::Data) +target_link_libraries(Combinatorial_map_copy_test_index PRIVATE CGAL::CGAL CGAL::Data) cgal_add_compilation_test(Combinatorial_map_copy_test_index) create_single_source_cgal_program(cmap_test_split_attribute.cpp) diff --git a/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt b/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt index 9edaaea2384b..e8ce84945ce7 100644 --- a/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt +++ b/Kinetic_space_partition/test/Kinetic_space_partition/CMakeLists.txt @@ -27,8 +27,8 @@ if(Boost_FOUND) foreach(target ${targets}) create_single_source_cgal_program("${target}.cpp") if(TARGET ${target}) - target_link_libraries(${target} PUBLIC ${project_linked_libraries} CGAL::Eigen3_support) - target_compile_definitions(${target} PUBLIC ${project_compilation_definitions}) + target_link_libraries(${target} PRIVATE ${project_linked_libraries} CGAL::Eigen3_support) + target_compile_definitions(${target} PRIVATE ${project_compilation_definitions}) endif() endforeach() else() diff --git a/Lab/demo/Lab/Plugins/Display/CMakeLists.txt b/Lab/demo/Lab/Plugins/Display/CMakeLists.txt index 9c9474d0cf7f..f1beddaf360e 100644 --- a/Lab/demo/Lab/Plugins/Display/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Display/CMakeLists.txt @@ -4,7 +4,8 @@ qt6_wrap_ui(display_propertyUI_FILES Display_property.ui) cgal_lab_plugin(display_property_plugin Display_property_plugin ${display_propertyUI_FILES} KEYWORDS Viewer) target_link_libraries(display_property_plugin PUBLIC scene_surface_mesh_item scene_points_with_normal_item - scene_color_ramp) + scene_color_ramp + CGAL::Eigen3_support) if(TARGET CGAL::Eigen3_support) qt6_wrap_ui(heat_methodUI_FILES Heat_method.ui) diff --git a/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt b/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt index 7e8a8b3841db..6d023a5b4ce5 100644 --- a/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt @@ -179,7 +179,8 @@ cgal_lab_plugin(engrave_text_plugin Engrave_text_plugin ${engravUI_FILES}) target_link_libraries( engrave_text_plugin PUBLIC scene_surface_mesh_item scene_selection_item - scene_polylines_item) + scene_polylines_item + CGAL::Eigen3_support) if(CGAL_ENABLE_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) set_tests_properties( diff --git a/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt b/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt index 55d67500fea9..b088ff9a0f38 100644 --- a/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt @@ -179,7 +179,7 @@ cgal_lab_plugin(point_set_clustering_plugin Point_set_clustering_plugin KEYWORDS PointSetProcessing) target_link_libraries( point_set_clustering_plugin PUBLIC scene_points_with_normal_item - scene_callback_signaler) + scene_callback_signaler CGAL::Eigen3_support) cgal_lab_plugin(merge_point_sets_plugin Merge_point_sets_plugin KEYWORDS PointSetProcessing Classification) 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 af87a391aa7d..b4389a10e2ac 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 @@ -37,8 +37,8 @@ if(NOT MSVC_VERSION OR MSVC_VERSION GREATER_EQUAL 1919 OR MSVC_VERSION LESS 1910 find_package(LASLIB QUIET) include(CGAL_LASLIB_support) if (TARGET CGAL::LASLIB_support) - target_link_libraries(test_read_write_point_set PUBLIC ${CGAL_libs} CGAL::LASLIB_support) - target_link_libraries(test_deprecated_io_point_set PUBLIC ${CGAL_libs} CGAL::LASLIB_support) + target_link_libraries(test_read_write_point_set PRIVATE ${CGAL_libs} CGAL::LASLIB_support) + target_link_libraries(test_deprecated_io_point_set PRIVATE ${CGAL_libs} CGAL::LASLIB_support) else() message(STATUS "NOTICE: the LAS reader test requires LASlib and will not be compiled.") endif() From 520a1af5e85909c9395baa22d46d7e49604b6806 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Oct 2024 07:18:49 +0100 Subject: [PATCH 06/29] Can we savely remove add_definitions(-DQT_NO_KEYWORDS) @lrineau ? --- .../demo/Optimal_transportation_reconstruction_2/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt b/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt index 865f2e74f8aa..97595c0cf1a3 100644 --- a/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt +++ b/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt @@ -28,7 +28,6 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) - add_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) add_executable(Otr2_demo glviewer.cpp scene.cpp Otr2_demo.cpp window.cpp render.cpp dialog_options.cpp From 95616154d579b618b3514c3234dde09cb574932b Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Oct 2024 07:19:52 +0100 Subject: [PATCH 07/29] More PRIVATE in LCC and Generalized_map --- .../test/Combinatorial_map/CMakeLists.txt | 4 ++-- .../test/Generalized_map/CMakeLists.txt | 4 ++-- .../test/Linear_cell_complex/CMakeLists.txt | 16 ++++++++-------- .../Polygon_mesh_processing/CMakeLists.txt | 2 +- .../test/Polygon_mesh_processing/CMakeLists.txt | 2 +- STL_Extension/test/STL_Extension/CMakeLists.txt | 2 +- .../examples/Shape_detection/CMakeLists.txt | 2 +- .../test/Tetrahedral_remeshing/CMakeLists.txt | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt index b83c3b00df43..b440e2576362 100644 --- a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt +++ b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt @@ -15,12 +15,12 @@ create_single_source_cgal_program(Combinatorial_map_copy_test.cpp ${hfiles}) # Same targets, defining USE_COMPACT_CONTAINER_WITH_INDEX to test index version add_executable(Combinatorial_map_test_index Combinatorial_map_test.cpp ${hfiles}) -target_compile_definitions(Combinatorial_map_test_index PUBLIC USE_COMPACT_CONTAINER_WITH_INDEX) +target_compile_definitions(Combinatorial_map_test_index PRIVATE USE_COMPACT_CONTAINER_WITH_INDEX) target_link_libraries(Combinatorial_map_test_index PRIVATE CGAL::CGAL CGAL::Data) cgal_add_compilation_test(Combinatorial_map_test_index) add_executable(Combinatorial_map_copy_test_index Combinatorial_map_copy_test.cpp ${hfiles}) -target_compile_definitions(Combinatorial_map_copy_test_index PUBLIC USE_COMPACT_CONTAINER_WITH_INDEX) +target_compile_definitions(Combinatorial_map_copy_test_index PRIVATE USE_COMPACT_CONTAINER_WITH_INDEX) target_link_libraries(Combinatorial_map_copy_test_index PRIVATE CGAL::CGAL CGAL::Data) cgal_add_compilation_test(Combinatorial_map_copy_test_index) diff --git a/Generalized_map/test/Generalized_map/CMakeLists.txt b/Generalized_map/test/Generalized_map/CMakeLists.txt index 5839c02a6985..24ac67748cdc 100644 --- a/Generalized_map/test/Generalized_map/CMakeLists.txt +++ b/Generalized_map/test/Generalized_map/CMakeLists.txt @@ -15,8 +15,8 @@ set(hfiles Generalized_map_2_test.h create_single_source_cgal_program("Generalized_map_test.cpp" ${hfiles}) add_executable(Generalized_map_test_index Generalized_map_test.cpp ${hfiles}) -target_compile_definitions(Generalized_map_test_index PUBLIC USE_COMPACT_CONTAINER_WITH_INDEX) -target_link_libraries(Generalized_map_test_index PUBLIC CGAL CGAL::Data) +target_compile_definitions(Generalized_map_test_index PRIVATE USE_COMPACT_CONTAINER_WITH_INDEX) +target_link_libraries(Generalized_map_test_index PRIVATE CGAL CGAL::Data) cgal_add_compilation_test(Generalized_map_test_index) create_single_source_cgal_program("gmap_test_split_attribute.cpp") diff --git a/Linear_cell_complex/test/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/test/Linear_cell_complex/CMakeLists.txt index dde51b6546b9..3f12de77ceea 100644 --- a/Linear_cell_complex/test/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/test/Linear_cell_complex/CMakeLists.txt @@ -18,21 +18,21 @@ create_single_source_cgal_program(LCC_3_incremental_builder_test.cpp ${hfiles}) # Same targets, defining USE_COMPACT_CONTAINER_WITH_INDEX to test index version add_executable(Linear_cell_complex_2_test_index Linear_cell_complex_2_test.cpp ${hfiles}) -target_compile_definitions(Linear_cell_complex_2_test_index PUBLIC USE_COMPACT_CONTAINER_WITH_INDEX) -target_link_libraries(Linear_cell_complex_2_test_index PUBLIC CGAL CGAL::Data) +target_compile_definitions(Linear_cell_complex_2_test_index PRIVATE USE_COMPACT_CONTAINER_WITH_INDEX) +target_link_libraries(Linear_cell_complex_2_test_index PRIVATE CGAL CGAL::Data) cgal_add_compilation_test(Linear_cell_complex_2_test_index) add_executable(Linear_cell_complex_3_test_index Linear_cell_complex_3_test.cpp ${hfiles}) -target_compile_definitions(Linear_cell_complex_3_test_index PUBLIC USE_COMPACT_CONTAINER_WITH_INDEX) -target_link_libraries(Linear_cell_complex_3_test_index PUBLIC CGAL CGAL::Data) +target_compile_definitions(Linear_cell_complex_3_test_index PRIVATE USE_COMPACT_CONTAINER_WITH_INDEX) +target_link_libraries(Linear_cell_complex_3_test_index PRIVATE CGAL CGAL::Data) cgal_add_compilation_test(Linear_cell_complex_3_test_index) add_executable(Linear_cell_complex_4_test_index Linear_cell_complex_4_test.cpp ${hfiles}) -target_compile_definitions(Linear_cell_complex_4_test_index PUBLIC USE_COMPACT_CONTAINER_WITH_INDEX) -target_link_libraries(Linear_cell_complex_4_test_index PUBLIC CGAL CGAL::Data) +target_compile_definitions(Linear_cell_complex_4_test_index PRIVATE USE_COMPACT_CONTAINER_WITH_INDEX) +target_link_libraries(Linear_cell_complex_4_test_index PRIVATE CGAL CGAL::Data) cgal_add_compilation_test(Linear_cell_complex_4_test_index) add_executable(Linear_cell_complex_copy_test_index Linear_cell_complex_copy_test.cpp ${hfiles}) -target_compile_definitions(Linear_cell_complex_copy_test_index PUBLIC USE_COMPACT_CONTAINER_WITH_INDEX) -target_link_libraries(Linear_cell_complex_copy_test_index PUBLIC CGAL CGAL::Data) +target_compile_definitions(Linear_cell_complex_copy_test_index PRIVATE USE_COMPACT_CONTAINER_WITH_INDEX) +target_link_libraries(Linear_cell_complex_copy_test_index PRIVATE CGAL CGAL::Data) cgal_add_compilation_test(Linear_cell_complex_copy_test_index) diff --git a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt index bb3be52226a4..11c27fb7f81b 100644 --- a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt @@ -30,7 +30,7 @@ if (FAST_ENVELOPE_BUILD_DIR) create_single_source_cgal_program("fastE.cpp") target_link_libraries( fastE PRIVATE CGAL::Eigen3_support) - target_link_libraries( fastE PUBLIC FastEnvelope IndirectPredicates geogram) + target_link_libraries( fastE PRIVATE FastEnvelope IndirectPredicates geogram) else() message(STATUS "CMake variable FAST_ENVELOPE_BUILD_DIR is not defined; benchmark 'fastE' will not be built") diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index 3d121cbe5109..0dd21ab22e1c 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -126,7 +126,7 @@ include(CGAL_Ceres_support) if(TARGET CGAL::Ceres_support AND TARGET CGAL::Eigen3_support) target_link_libraries(test_mesh_smoothing PRIVATE CGAL::Eigen3_support CGAL::Ceres_support) -# target_compile_definitions(test_pmp_repair_self_intersections PUBLIC CGAL_PMP_USE_CERES_SOLVER) +# target_compile_definitions(test_pmp_repair_self_intersections PRIVATE CGAL_PMP_USE_CERES_SOLVER) # target_link_libraries(test_pmp_repair_self_intersections PRIVATE CGAL::Eigen3_support CGAL::Ceres_support) else() message(STATUS "NOTICE: Tests are not using Ceres.") diff --git a/STL_Extension/test/STL_Extension/CMakeLists.txt b/STL_Extension/test/STL_Extension/CMakeLists.txt index 7e47f6c07be6..fafddb64a219 100644 --- a/STL_Extension/test/STL_Extension/CMakeLists.txt +++ b/STL_Extension/test/STL_Extension/CMakeLists.txt @@ -37,7 +37,7 @@ create_single_source_cgal_program("test_cgal_named_params.cpp") add_executable(test_multiset_cc "test_multiset.cpp") target_link_libraries(test_multiset_cc PRIVATE CGAL::CGAL) -target_compile_options(test_multiset_cc PUBLIC -DCGAL_MULTISET_USE_COMPACT_CONTAINER_AS_DEFAULT) +target_compile_options(test_multiset_cc PRIVATE -DCGAL_MULTISET_USE_COMPACT_CONTAINER_AS_DEFAULT) cgal_add_test(test_multiset_cc) add_to_cached_list(CGAL_EXECUTABLE_TARGETS test_multiset_cc) diff --git a/Shape_detection/examples/Shape_detection/CMakeLists.txt b/Shape_detection/examples/Shape_detection/CMakeLists.txt index bcbd16339b91..0a9425927310 100644 --- a/Shape_detection/examples/Shape_detection/CMakeLists.txt +++ b/Shape_detection/examples/Shape_detection/CMakeLists.txt @@ -26,7 +26,7 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("region_growing_lines_on_segment_set.cpp") create_single_source_cgal_program("region_growing_planes_on_polygon_mesh.cpp") add_executable(region_growing_planes_on_polyhedron region_growing_planes_on_polygon_mesh.cpp) - target_compile_definitions(region_growing_planes_on_polyhedron PUBLIC -DUSE_POLYHEDRON) + target_compile_definitions(region_growing_planes_on_polyhedron PRIVATE -DUSE_POLYHEDRON) target_link_libraries(region_growing_planes_on_polyhedron PRIVATE CGAL::CGAL CGAL::Eigen3_support) foreach( diff --git a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt index 1e4d38d7a86d..ba308112e328 100644 --- a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt @@ -22,7 +22,7 @@ add_executable(test_tetrahedral_remeshing_mls "test_tetrahedral_remeshing.cpp") target_link_libraries(test_tetrahedral_remeshing_mls PRIVATE CGAL::CGAL CGAL::Data) target_compile_definitions(test_tetrahedral_remeshing_mls - PUBLIC -DCGAL_TET_REMESHING_SMOOTHING_WITH_MLS) + PRIVATE -DCGAL_TET_REMESHING_SMOOTHING_WITH_MLS) cgal_add_test(test_tetrahedral_remeshing_mls) @@ -45,7 +45,7 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(test_mesh_and_remesh_polyhedron_with_features_mls PRIVATE CGAL::CGAL CGAL::Data CGAL::Eigen3_support) target_compile_definitions(test_mesh_and_remesh_polyhedron_with_features_mls - PUBLIC -DCGAL_TET_REMESHING_SMOOTHING_WITH_MLS) + PRIVATE -DCGAL_TET_REMESHING_SMOOTHING_WITH_MLS) cgal_add_test(test_mesh_and_remesh_polyhedron_with_features_mls) if(CGAL_ImageIO_USE_ZLIB) From 74e8e23b8523c2fcc333245e155eebcacc4dc34b Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Oct 2024 07:32:27 +0100 Subject: [PATCH 08/29] Use target_compile_definitions() --- .../examples/Point_set_processing_3/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 dbbfd1efe866..85e72510b3b5 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 @@ -8,9 +8,6 @@ find_package(CGAL REQUIRED) # VisualC++ optimization for applications dealing with large data if(MSVC) - # Quit warning in the lasreader - add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS) - if(CMAKE_SIZEOF_VOID_P EQUAL 4) # Allow Windows 32bit applications to use up to 3GB of RAM set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE") @@ -63,6 +60,10 @@ if(NOT MSVC_VERSION OR MSVC_VERSION GREATER_EQUAL 1919 OR MSVC_VERSION LESS 1910 create_single_source_cgal_program("write_las_example.cpp") target_link_libraries(read_las_example PRIVATE ${CGAL_libs} CGAL::LASLIB_support) target_link_libraries(write_las_example PRIVATE ${CGAL_libs} CGAL::LASLIB_support) + + target_compile_definitions(read_las_example PRIVATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS) + target_compile_definitions(write_las_example PRIVATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS) + else() message(STATUS "NOTICE : the LAS reader test requires LASlib and will not be compiled.") endif() From d817ddad248599470e24ab19c8f5dd850294c566 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Oct 2024 08:23:13 +0100 Subject: [PATCH 09/29] Use target_compile_definitions() --- .../examples/Surface_mesh_parameterization/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt index 49fdcfc45697..38b0f74f05fc 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt @@ -30,8 +30,6 @@ if(TARGET CGAL::Eigen3_support) if(SuiteSparse_UMFPACK_FOUND OR TARGET SuiteSparse::umfpack) message(STATUS "SuiteSparse_LIBS: ${SuiteSparse_LIBRARIES}") message(STATUS "Orbifold Tutte Embeddings will use UmfPackLU") - add_definitions(-DEIGEN_DONT_ALIGN_STATICALLY) - add_definitions(-DCGAL_SMP_USE_SUITESPARSE_SOLVERS) else() message(STATUS "NOTICE: The example `orbifold.cpp` will be compiled without the SuiteSparse library and UmfPack. Try setting SuiteSparse_UMF_INCLUDE_DIR and at least one of SuiteSparse_UMFPACK_LIBRARY_RELEASE and SuiteSparse_UMFPACK_LIBRARY_DEBUG to you UMFPACK installation.") endif() @@ -60,6 +58,8 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program( "iterative_authalic_parameterizer.cpp" ) target_link_libraries(iterative_authalic_parameterizer PRIVATE CGAL::Eigen3_support) if(SuiteSparse_FOUND) + target_compile_definitions(ARAP_parameterization PRIVATE -DEIGEN_DONT_ALIGN_STATICALLY -DCGAL_SMP_USE_SUITESPARSE_SOLVERS ) + target_compile_definitions(orbifold PRIVATE -DEIGEN_DONT_ALIGN_STATICALLY -DCGAL_SMP_USE_SUITESPARSE_SOLVERS ) target_link_libraries(ARAP_parameterization PRIVATE ${SuiteSparse_LIBRARIES}) target_link_libraries(orbifold PRIVATE ${SuiteSparse_LIBRARIES}) endif() From 10b37057f41fa154583b8733d25fd91aaf0bebf2 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Oct 2024 09:07:08 +0100 Subject: [PATCH 10/29] Only link to Boost::program_options and not to Do the same later elsewhere, but let's first see a green testsuite --- Ridges_3/examples/Ridges_3/CMakeLists.txt | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index ef3d5b1e90ff..eecde864e41b 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -19,15 +19,10 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(Ridges_Umbilics_LCC PRIVATE CGAL::Eigen3_support) add_definitions("-DCGAL_USE_BOOST_PROGRAM_OPTIONS") - if(TARGET Boost::program_options) - target_link_libraries(Compute_Ridges_Umbilics PRIVATE Boost::program_options) - target_link_libraries(Ridges_Umbilics_SM PRIVATE Boost::program_options) - target_link_libraries(Ridges_Umbilics_LCC PRIVATE Boost::program_options) - else() - target_link_libraries(Compute_Ridges_Umbilics PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) - target_link_libraries(Ridges_Umbilics_SM PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) - target_link_libraries(Ridges_Umbilics_LCC PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) - endif() + target_link_libraries(Compute_Ridges_Umbilics PRIVATE Boost::program_options) + target_link_libraries(Ridges_Umbilics_SM PRIVATE Boost::program_options) + target_link_libraries(Ridges_Umbilics_LCC PRIVATE Boost::program_options) + else() message("NOTICE: This project requires Boost Program Options and will not be compiled.") endif() From 9e75ab340d75f7cc7ac1f9695cb9b294f6981280 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Oct 2024 11:58:52 +0100 Subject: [PATCH 11/29] Use add_compile_definitions --- AABB_tree/demo/AABB_tree/CMakeLists.txt | 2 +- .../demo/Alpha_shapes_3/CMakeLists.txt | 2 +- .../Arrangement_on_surface_2/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../demo/Alpha_shapes_2/CMakeLists.txt | 2 +- .../demo/Apollonius_graph_2/CMakeLists.txt | 2 +- .../demo/Bounding_volumes/CMakeLists.txt | 2 +- .../demo/Circular_kernel_2/CMakeLists.txt | 2 +- GraphicsView/demo/Generator/CMakeLists.txt | 2 +- GraphicsView/demo/GraphicsView/CMakeLists.txt | 2 +- .../demo/L1_Voronoi_diagram_2/CMakeLists.txt | 2 +- .../demo/Largest_empty_rect_2/CMakeLists.txt | 2 +- .../Periodic_2_triangulation_2/CMakeLists.txt | 2 +- GraphicsView/demo/Polygon/CMakeLists.txt | 4 ++-- .../Segment_Delaunay_graph_2/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../demo/Snap_rounding_2/CMakeLists.txt | 2 +- .../demo/Spatial_searching_2/CMakeLists.txt | 2 +- .../demo/Stream_lines_2/CMakeLists.txt | 2 +- .../demo/Triangulation_2/CMakeLists.txt | 2 +- Kernel_23/test/Kernel_23/CMakeLists.txt | 2 +- Lab/demo/Lab/CMakeLists.txt | 10 ++++----- .../Linear_cell_complex_2/CMakeLists.txt | 6 ++--- .../Linear_cell_complex_3/CMakeLists.txt | 4 ++-- .../demo/Linear_cell_complex/CMakeLists.txt | 22 +++++++++---------- .../Linear_cell_complex/CMakeLists.txt | 2 +- Mesh_3/benchmark/Mesh_3/CMakeLists.txt | 6 ++--- Mesh_3/examples/Mesh_3/CMakeLists.txt | 6 ++--- .../Periodic_3_triangulation_3/CMakeLists.txt | 2 +- .../Polyline_simplification_2/CMakeLists.txt | 2 +- Ridges_3/examples/Ridges_3/CMakeLists.txt | 2 +- .../test/Shape_detection/CMakeLists.txt | 2 +- Surface_mesh/benchmark/CMakeLists.txt | 6 ++--- .../Surface_mesh_topology/CMakeLists.txt | 4 ++-- .../Surface_mesh_topology/CMakeLists.txt | 8 +++---- .../test/Surface_mesh_topology/CMakeLists.txt | 8 +++---- .../Tetrahedral_remeshing/CMakeLists.txt | 2 +- .../test/Tetrahedral_remeshing/CMakeLists.txt | 4 ++-- .../demo/Triangulation_3/CMakeLists.txt | 4 ++-- 39 files changed, 72 insertions(+), 72 deletions(-) diff --git a/AABB_tree/demo/AABB_tree/CMakeLists.txt b/AABB_tree/demo/AABB_tree/CMakeLists.txt index b276517937e0..6a8551246fc6 100644 --- a/AABB_tree/demo/AABB_tree/CMakeLists.txt +++ b/AABB_tree/demo/AABB_tree/CMakeLists.txt @@ -14,7 +14,7 @@ find_package(Qt6 QUIET COMPONENTS Gui OpenGL) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) # Instruct CMake to run moc/ui/rcc automatically when needed. set(CMAKE_AUTOMOC ON) diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt index a167cf634db7..ffd128922f99 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt @@ -13,7 +13,7 @@ find_package(Qt6 QUIET COMPONENTS Widgets OpenGL) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) # Instruct CMake to run moc/ui/rcc automatically when needed. set(CMAKE_AUTOMOC ON) diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt index 6d80cda629a1..f0546d39b6ba 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt @@ -20,7 +20,7 @@ if (CGAL_Qt6_FOUND AND Qt6_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) # Arrangement package includes - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) option(COMPILE_UTILS_INCREMENTALLY "Compile files in Utils directory incrementally, or compile them all as a unit. \ Incremental compilation will be better for development and consume less \ diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/CMakeLists.txt b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/CMakeLists.txt index 5d0cf45b9523..47ac56dde951 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/CMakeLists.txt @@ -39,7 +39,7 @@ endif() -add_definitions(-DQT_NO_VERSION_TAGGING) +add_compile_definitions(-DQT_NO_VERSION_TAGGING) # AOS file(GLOB source_files_aos Aos.h Aos.cpp Aos_defs.h diff --git a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt index 62a0eccf3822..da0637016798 100644 --- a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt +++ b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt @@ -9,7 +9,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt index 157517fa35d7..9be2cac7fed4 100644 --- a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt @@ -9,7 +9,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt index 42b98ccf55fd..3dc7150fa42a 100644 --- a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt +++ b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt @@ -19,7 +19,7 @@ endif() if(CGAL_Qt6_FOUND AND Qt6_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) diff --git a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt index 351fb788b3fa..d5d492cfae83 100644 --- a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt +++ b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt @@ -9,7 +9,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/GraphicsView/demo/Generator/CMakeLists.txt b/GraphicsView/demo/Generator/CMakeLists.txt index fd3550dd5e68..6d58ed411ccc 100644 --- a/GraphicsView/demo/Generator/CMakeLists.txt +++ b/GraphicsView/demo/Generator/CMakeLists.txt @@ -9,7 +9,7 @@ find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/GraphicsView/demo/GraphicsView/CMakeLists.txt b/GraphicsView/demo/GraphicsView/CMakeLists.txt index f5df86dac284..2e96d21559a7 100644 --- a/GraphicsView/demo/GraphicsView/CMakeLists.txt +++ b/GraphicsView/demo/GraphicsView/CMakeLists.txt @@ -9,7 +9,7 @@ find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) qt_add_executable(min min.cpp) diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt index 437603b1abbf..90b33fd63887 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt @@ -11,7 +11,7 @@ include_directories(BEFORE ./include) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt index 369d938d4676..1a54859e917f 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt +++ b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt @@ -10,7 +10,7 @@ find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt index ba2b3e85708d..6b7f60e065bc 100644 --- a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt @@ -8,7 +8,7 @@ include_directories(BEFORE ./include) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) diff --git a/GraphicsView/demo/Polygon/CMakeLists.txt b/GraphicsView/demo/Polygon/CMakeLists.txt index e3e4758a1cf2..e7f8e01c4449 100644 --- a/GraphicsView/demo/Polygon/CMakeLists.txt +++ b/GraphicsView/demo/Polygon/CMakeLists.txt @@ -16,13 +16,13 @@ endif() find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) if(CGAL_Core_FOUND) - add_definitions(-DCGAL_USE_CORE) + add_compile_definitions(-DCGAL_USE_CORE) endif() qt_add_executable(Polygon_2 Polygon_2.cpp diff --git a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt index 4662d848a9e4..2839b7bc5bd8 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt @@ -15,7 +15,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) qt_add_executable( diff --git a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt index 45d7de3f21b0..db839e832a7f 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt @@ -13,7 +13,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) qt_add_executable( Segment_voronoi_linf_2 Segment_voronoi_linf_2.cpp diff --git a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt index 84a65d8d79d6..f69d4103c8fb 100644 --- a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt +++ b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt @@ -12,7 +12,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) qt_add_executable( Snap_rounding_2 Snap_rounding_2.cpp diff --git a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt index a5cbfc4346cb..d486a7f0bf9b 100644 --- a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt +++ b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt @@ -10,7 +10,7 @@ find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt index 85a1a90d1454..586e84746253 100644 --- a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt +++ b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt @@ -10,7 +10,7 @@ find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/GraphicsView/demo/Triangulation_2/CMakeLists.txt b/GraphicsView/demo/Triangulation_2/CMakeLists.txt index 515dfca67812..31cad71c9b20 100644 --- a/GraphicsView/demo/Triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Triangulation_2/CMakeLists.txt @@ -17,7 +17,7 @@ if(NOT CGAL_Qt6_FOUND OR NOT Qt6_FOUND) return() endif() -add_definitions(-DQT_NO_KEYWORDS) +add_compile_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) #-------------------------------- diff --git a/Kernel_23/test/Kernel_23/CMakeLists.txt b/Kernel_23/test/Kernel_23/CMakeLists.txt index e617a7882429..13ce4d27a38f 100644 --- a/Kernel_23/test/Kernel_23/CMakeLists.txt +++ b/Kernel_23/test/Kernel_23/CMakeLists.txt @@ -37,7 +37,7 @@ if(CGAL_KERNEL_23_TEST_RT_FT_PREDICATE_FLAGS) # - create a lot of possible combinations, which is expensive to test # - create issues because some combinations might be RT-sufficient whereas others will require FT # - # add_definitions(-DCGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_PREDICATES_WITH_TEMPLATED_OPERATORS) + # add_compile_definitions(-DCGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_PREDICATES_WITH_TEMPLATED_OPERATORS) create_single_source_cgal_program("atomic_compilation_test.cpp") target_precompile_headers(atomic_compilation_test PUBLIC [["atomic_RT_FT_predicate_headers.h"]]) diff --git a/Lab/demo/Lab/CMakeLists.txt b/Lab/demo/Lab/CMakeLists.txt index a1ff59c01b51..41b160690619 100644 --- a/Lab/demo/Lab/CMakeLists.txt +++ b/Lab/demo/Lab/CMakeLists.txt @@ -3,7 +3,7 @@ project(Lab_Demo) include(FeatureSummary) -add_definitions ( -DCGAL_NO_DEPRECATED_CODE ) +add_compile_definitions ( -DCGAL_NO_DEPRECATED_CODE ) # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -48,8 +48,8 @@ set_package_properties( DESCRIPTION "To find this package, it should be sufficient to fill the Qt6_DIR variable with: ///lib/cmake/Qt6") if(Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) - add_definitions(-DSCENE_IMAGE_GL_BUFFERS_AVAILABLE) + add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DSCENE_IMAGE_GL_BUFFERS_AVAILABLE) endif(Qt6_FOUND) find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) @@ -94,7 +94,7 @@ option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate parallelism in Mesh_3" OFF) # And add -DCGAL_CONCURRENT_MESH_3 if that option is ON if(CGAL_ACTIVATE_CONCURRENT_MESH_3 OR "$ENV{CGAL_ACTIVATE_CONCURRENT_MESH_3}") - add_definitions(-DCGAL_CONCURRENT_MESH_3) + add_compile_definitions(-DCGAL_CONCURRENT_MESH_3) if(NOT TBB_FOUND) find_package(TBB REQUIRED) include(CGAL_TBB_support) @@ -345,7 +345,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) add_to_cached_list(CGAL_EXECUTABLE_TARGETS ${lib}) endforeach() - add_definitions(-DUSE_FORWARD_DECL) + add_compile_definitions(-DUSE_FORWARD_DECL) add_library( cgal_lab SHARED MainWindow.cpp diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_2/CMakeLists.txt b/Linear_cell_complex/benchmark/Linear_cell_complex_2/CMakeLists.txt index 986cd4f2fdb5..23999e2d8470 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_2/CMakeLists.txt +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_2/CMakeLists.txt @@ -13,9 +13,9 @@ link_directories(${CMAKE_CURRENT_SOURCE_DIR}/cgogn/lib/Release) include_directories(BEFORE "/usr/include/libxml2/") # For profilling with gprof -#add_definitions("-pg") +#add_compile_definitions("-pg") #SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") -# add_definitions("-g") +# add_compile_definitions("-g") # OpenMesh find_package(OpenMesh REQUIRED) @@ -47,7 +47,7 @@ find_package(Qt REQUIRED) set(QT_USE_QTSVG TRUE) set(QT_USE_QTXML TRUE) include(${QT_USE_FILE}) -add_definitions(${QT_DEFINITIONS}) +add_compile_definitions(${QT_DEFINITIONS}) set(CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ${QT_INCLUDE_DIR}) set(CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} ${QT_LIBRARIES}) diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt b/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt index 8bbdcaddddba..386bc33fafea 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt @@ -21,9 +21,9 @@ find_package(Qt REQUIRED) set(QT_USE_QTSVG TRUE) set(QT_USE_QTXML TRUE) include(${QT_USE_FILE}) -add_definitions(${QT_DEFINITIONS}) +add_compile_definitions(${QT_DEFINITIONS}) -add_definitions(-DINCLUDE_TEMPLATES) +add_compile_definitions(-DINCLUDE_TEMPLATES) # Performance_3 add_executable(performance_3 performance_3.cpp) diff --git a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt index 33a5b9b4c1f7..1cba87aeb682 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt @@ -9,25 +9,25 @@ project(Linear_cell_complex_Demo) set(CMAKE_INCLUDE_CURRENT_DIR ON) ## To add expensive tests -# add_definitions("-DCGAL_CHECK_EXPENSIVE") -# add_definitions("-Wall -Wextra") -# add_definitions(-fsanitize=address) +# add_compile_definitions("-DCGAL_CHECK_EXPENSIVE") +# add_compile_definitions("-Wall -Wextra") +# add_compile_definitions(-fsanitize=address) # add_link_options(-fsanitize=address) -# add_definitions("-D_GLIBCXX_DEBUG") +# add_compile_definitions("-D_GLIBCXX_DEBUG") ## For profilling with gprof -# add_definitions("-pg") +# add_compile_definitions("-pg") # SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") ## To add an is_valid test after each operation (only in debug mode) -# add_definitions("-DCGAL_CMAP_TEST_VALID_REMOVALS") -# add_definitions("-DCGAL_CMAP_TEST_VALID_CONTRACTIONS") -# add_definitions("-DCGAL_CMAP_TEST_VALID_INSERTIONS") +# add_compile_definitions("-DCGAL_CMAP_TEST_VALID_REMOVALS") +# add_compile_definitions("-DCGAL_CMAP_TEST_VALID_CONTRACTIONS") +# add_compile_definitions("-DCGAL_CMAP_TEST_VALID_INSERTIONS") # Option allowing to profile each operation of the demo (cout times on stdout). -add_definitions(-DCGAL_PROFILE_LCC_DEMO) +add_compile_definitions(-DCGAL_PROFILE_LCC_DEMO) -add_definitions(-DCMAP_WITH_INDEX) # to use cc with index (handle otherwise) +add_compile_definitions(-DCMAP_WITH_INDEX) # to use cc with index (handle otherwise) ################## find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) @@ -40,7 +40,7 @@ if(NOT CGAL_Qt6_FOUND OR NOT Qt6_FOUND) else() - add_definitions(-DCGAL_USE_BASIC_VIEWER -DQT_NO_KEYWORDS) + add_compile_definitions(-DCGAL_USE_BASIC_VIEWER -DQT_NO_KEYWORDS) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) diff --git a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt index bec92c80e309..da2c0144a6e1 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt @@ -11,7 +11,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) # set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") # To use valgrind, we must disable rounding math check. -# add_definitions(-DCGAL_DISABLE_ROUNDING_MATH_CHECK) +# add_compile_definitions(-DCGAL_DISABLE_ROUNDING_MATH_CHECK) create_single_source_cgal_program("gmap_linear_cell_complex_3.cpp") create_single_source_cgal_program("linear_cell_complex_3.cpp") diff --git a/Mesh_3/benchmark/Mesh_3/CMakeLists.txt b/Mesh_3/benchmark/Mesh_3/CMakeLists.txt index a74707749002..bc7a8944cb7b 100644 --- a/Mesh_3/benchmark/Mesh_3/CMakeLists.txt +++ b/Mesh_3/benchmark/Mesh_3/CMakeLists.txt @@ -6,13 +6,13 @@ project(Mesh_3_benchmark) find_package(CGAL REQUIRED COMPONENTS ImageIO) -add_definitions(-DCGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX +add_compile_definitions(-DCGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX -DCGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS) # Activate verbose mode? (turned OFF by default) option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate verbose mode in Mesh_3" OFF) if(MESH_3_VERBOSE) - add_definitions(-DCGAL_MESH_3_VERBOSE) + add_compile_definitions(-DCGAL_MESH_3_VERBOSE) endif() # Activate concurrency? (turned OFF by default) @@ -20,7 +20,7 @@ option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate parallelism in Mesh_3" OFF) # And add -DCGAL_CONCURRENT_MESH_3 if that option is ON if(CGAL_ACTIVATE_CONCURRENT_MESH_3) - add_definitions(-DCGAL_CONCURRENT_MESH_3) + add_compile_definitions(-DCGAL_CONCURRENT_MESH_3) find_package(TBB REQUIRED) include(CGAL_TBB_support) else() diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index aadcc5060aed..5ed6a9b95700 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -1,11 +1,11 @@ cmake_minimum_required(VERSION 3.12...3.29) project(Mesh_3_Examples) -add_definitions(-DCGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX +add_compile_definitions(-DCGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX -DCGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS) if(CGAL_MESH_3_VERBOSE) - add_definitions(-DCGAL_MESH_3_VERBOSE) + add_compile_definitions(-DCGAL_MESH_3_VERBOSE) endif() find_package(CGAL REQUIRED COMPONENTS ImageIO) @@ -13,7 +13,7 @@ find_package(CGAL REQUIRED COMPONENTS ImageIO) option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate parallelism in Mesh_3" OFF) if(CGAL_ACTIVATE_CONCURRENT_MESH_3 OR "$ENV{CGAL_ACTIVATE_CONCURRENT_MESH_3}") - add_definitions(-DCGAL_CONCURRENT_MESH_3) + add_compile_definitions(-DCGAL_CONCURRENT_MESH_3) find_package(TBB REQUIRED) include(CGAL_TBB_support) endif() diff --git a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt index e91b1e5719cc..30bc4d0c97f9 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt +++ b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt @@ -11,7 +11,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) find_package(Qt6 QUIET COMPONENTS Widgets OpenGL Help ToolsTools) if(Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) endif(Qt6_FOUND) diff --git a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt index a07d8998706c..69e4a9748459 100644 --- a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt +++ b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt @@ -12,7 +12,7 @@ find_package(Qt6 QUIET COMPONENTS Widgets) include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index eecde864e41b..22e25c7fd961 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -18,7 +18,7 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program(Ridges_Umbilics_LCC.cpp) target_link_libraries(Ridges_Umbilics_LCC PRIVATE CGAL::Eigen3_support) - add_definitions("-DCGAL_USE_BOOST_PROGRAM_OPTIONS") + add_compile_definitions("-DCGAL_USE_BOOST_PROGRAM_OPTIONS") target_link_libraries(Compute_Ridges_Umbilics PRIVATE Boost::program_options) target_link_libraries(Ridges_Umbilics_SM PRIVATE Boost::program_options) target_link_libraries(Ridges_Umbilics_LCC PRIVATE Boost::program_options) diff --git a/Shape_detection/test/Shape_detection/CMakeLists.txt b/Shape_detection/test/Shape_detection/CMakeLists.txt index 34d6f1c0ad53..2f4245f2f762 100644 --- a/Shape_detection/test/Shape_detection/CMakeLists.txt +++ b/Shape_detection/test/Shape_detection/CMakeLists.txt @@ -50,7 +50,7 @@ if(TARGET CGAL::Eigen3_support) set(RANSAC_PROTO_DIR CACHE PATH "") if(NOT RANSAC_PROTO_DIR STREQUAL "") - add_definitions(-DPOINTSWITHINDEX -DCGAL_TEST_RANSAC_PROTOTYPE) + add_compile_definitions(-DPOINTSWITHINDEX -DCGAL_TEST_RANSAC_PROTOTYPE) include_directories(${RANSAC_PROTO_DIR}) include_directories(${RANSAC_PROTO_DIR}/MiscLib/) file(GLOB proto_src "${RANSAC_PROTO_DIR}/*.cpp") diff --git a/Surface_mesh/benchmark/CMakeLists.txt b/Surface_mesh/benchmark/CMakeLists.txt index 6faf4b6b6fe4..c963412dd5b6 100644 --- a/Surface_mesh/benchmark/CMakeLists.txt +++ b/Surface_mesh/benchmark/CMakeLists.txt @@ -4,10 +4,10 @@ project(Surface_mesh_performance) find_package(CGAL REQUIRED) # For profilling with gprof -#add_definitions("-pg") +#add_compile_definitions("-pg") #SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") -# add_definitions("-g") -add_definitions("-std=c++1y") +# add_compile_definitions("-g") +add_compile_definitions("-std=c++1y") # Polyhedron add_executable(polyhedron_performance performance_2.h polyhedron_performance.h diff --git a/Surface_mesh_topology/benchmark/Surface_mesh_topology/CMakeLists.txt b/Surface_mesh_topology/benchmark/Surface_mesh_topology/CMakeLists.txt index 595aee92c9df..0459f5ea2490 100644 --- a/Surface_mesh_topology/benchmark/Surface_mesh_topology/CMakeLists.txt +++ b/Surface_mesh_topology/benchmark/Surface_mesh_topology/CMakeLists.txt @@ -4,8 +4,8 @@ cmake_minimum_required(VERSION 3.12...3.29) find_package(CGAL REQUIRED) -# add_definitions(-DCGAL_TRACE_PATH_TESTS) -# add_definitions(-DCGAL_TRACE_CMAP_TOOLS) +# add_compile_definitions(-DCGAL_TRACE_PATH_TESTS) +# add_compile_definitions(-DCGAL_TRACE_CMAP_TOOLS) set(SOURCE_FILES quadrangulation_computation_benchmarks.cpp path_homotopy_with_schema.cpp) diff --git a/Surface_mesh_topology/examples/Surface_mesh_topology/CMakeLists.txt b/Surface_mesh_topology/examples/Surface_mesh_topology/CMakeLists.txt index d061af881979..d18f19190b82 100644 --- a/Surface_mesh_topology/examples/Surface_mesh_topology/CMakeLists.txt +++ b/Surface_mesh_topology/examples/Surface_mesh_topology/CMakeLists.txt @@ -3,10 +3,10 @@ project(Surface_mesh_topology_Examples) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) -# add_definitions(-DCGAL_TRACE_PATH_TESTS) -# add_definitions(-DCGAL_TRACE_CMAP_TOOLS) -# add_definitions("-Wall -Wextra") -# add_definitions("-D_GLIBCXX_DEBUG") +# add_compile_definitions(-DCGAL_TRACE_PATH_TESTS) +# add_compile_definitions(-DCGAL_TRACE_CMAP_TOOLS) +# add_compile_definitions("-Wall -Wextra") +# add_compile_definitions("-D_GLIBCXX_DEBUG") set(SOURCE_FILES edgewidth_lcc.cpp diff --git a/Surface_mesh_topology/test/Surface_mesh_topology/CMakeLists.txt b/Surface_mesh_topology/test/Surface_mesh_topology/CMakeLists.txt index 415d36cb6378..7924745df87d 100644 --- a/Surface_mesh_topology/test/Surface_mesh_topology/CMakeLists.txt +++ b/Surface_mesh_topology/test/Surface_mesh_topology/CMakeLists.txt @@ -3,10 +3,10 @@ project(Surface_mesh_topology_Tests) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) -# add_definitions(-DCGAL_TRACE_PATH_TESTS) -# add_definitions(-DCGAL_TRACE_CMAP_TOOLS) -# add_definitions("-Wall -Wextra") -# add_definitions("-D_GLIBCXX_DEBUG") +# add_compile_definitions(-DCGAL_TRACE_PATH_TESTS) +# add_compile_definitions(-DCGAL_TRACE_CMAP_TOOLS) +# add_compile_definitions("-Wall -Wextra") +# add_compile_definitions("-D_GLIBCXX_DEBUG") set(SOURCE_FILES fundamental_group_of_the_circle.cpp diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt index ed6255c74758..cd7a9f7e7370 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt @@ -16,7 +16,7 @@ create_single_source_cgal_program("tetrahedral_remeshing_from_mesh.cpp") # Concurrent Mesh_3 option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate parallelism in Mesh_3" OFF) if(CGAL_ACTIVATE_CONCURRENT_MESH_3 OR "$ENV{CGAL_ACTIVATE_CONCURRENT_MESH_3}") - add_definitions(-DCGAL_CONCURRENT_MESH_3) + add_compile_definitions(-DCGAL_CONCURRENT_MESH_3) find_package(TBB REQUIRED) include(CGAL_TBB_support) else() diff --git a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt index ba308112e328..07dfc6ea0f41 100644 --- a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt @@ -8,8 +8,8 @@ project(Tetrahedral_remeshing_Tests) # CGAL and its components find_package(CGAL REQUIRED COMPONENTS ImageIO) -add_definitions(-DCGAL_TETRAHEDRAL_REMESHING_VERBOSE) -#add_definitions(-DCGAL_CHECK_EXPENSIVE) #to activate expensive assertions +add_compile_definitions(-DCGAL_TETRAHEDRAL_REMESHING_VERBOSE) +#add_compile_definitions(-DCGAL_CHECK_EXPENSIVE) #to activate expensive assertions create_single_source_cgal_program("test_tetrahedral_remeshing.cpp") create_single_source_cgal_program("test_tetrahedral_remeshing_with_features.cpp") diff --git a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt index 4cfc223e677e..b4dfe997b885 100644 --- a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt @@ -12,7 +12,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) find_package(Qt6 QUIET COMPONENTS Widgets OpenGL) if(Qt6_FOUND) - add_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) endif(Qt6_FOUND) @@ -22,7 +22,7 @@ option(CGAL_ACTIVATE_CONCURRENT_TRIANGULATION_3 # And add -DCGAL_CONCURRENT_TRIANGULATION_3 if that option is ON if(CGAL_ACTIVATE_CONCURRENT_TRIANGULATION_3) - add_definitions(-DCGAL_CONCURRENT_TRIANGULATION_3) + add_compile_definitions(-DCGAL_CONCURRENT_TRIANGULATION_3) find_package(TBB REQUIRED) include(CGAL_TBB_support) else(CGAL_ACTIVATE_CONCURRENT_TRIANGULATION_3) From 5829760b0556c7483101f867dccc892de3a09675 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Oct 2024 13:12:52 +0100 Subject: [PATCH 12/29] No need to include from ../../include --- Triangulation_3/examples/Triangulation_3/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index dd50b2ada79e..1c8eb7b15841 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -3,8 +3,6 @@ project(Triangulation_3_Examples) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) -include_directories(BEFORE "../../include") - create_single_source_cgal_program("for_loop.cpp") create_single_source_cgal_program("adding_handles_3.cpp") create_single_source_cgal_program("color.cpp") From 9bf41340435c7a9cc0dc4df1836fa01a5220c25a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Oct 2024 13:14:11 +0100 Subject: [PATCH 13/29] Only link with Boost::program_options - Supported the minimum required cmake --- Generator/benchmark/Generator/CMakeLists.txt | 9 ++------- Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt | 8 ++------ Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt | 10 ++++------ 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/Generator/benchmark/Generator/CMakeLists.txt b/Generator/benchmark/Generator/CMakeLists.txt index a31ce5263695..e1daf72a2999 100644 --- a/Generator/benchmark/Generator/CMakeLists.txt +++ b/Generator/benchmark/Generator/CMakeLists.txt @@ -10,13 +10,8 @@ find_package(Boost COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) create_single_source_cgal_program("random_grid.cpp") create_single_source_cgal_program("random_disc_2.cpp") - if(TARGET Boost::program_options) - target_link_libraries(random_grid PRIVATE Boost::program_options) - target_link_libraries(random_disc_2 PRIVATE Boost::program_options) - else() - target_link_libraries(random_grid PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) - target_link_libraries(random_disc_2 PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) - endif() + target_link_libraries(random_grid PRIVATE Boost::program_options) + target_link_libraries(random_disc_2 PRIVATE Boost::program_options) else() message("NOTICE: The benchmarks requires Boost Program Options, and will not be compiled.") endif() diff --git a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt index 4785a6647bc6..a8bcc29b90cd 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt @@ -15,12 +15,8 @@ if(TARGET CGAL::Eigen3_support) find_package(Boost QUIET COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) create_single_source_cgal_program("Mesh_estimation.cpp") - target_link_libraries(Mesh_estimation PRIVATE CGAL::Eigen3_support) - if(TARGET Boost::program_options) - target_link_libraries(Mesh_estimation PRIVATE Boost::program_options) - else() - target_link_libraries(Mesh_estimation PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) - endif() + target_link_libraries(Mesh_estimation PRIVATE CGAL::Eigen3_support + Boost::program_options) else() message(STATUS "NOTICE: The example 'Mesh_estimation' requires Boost Program Options, and will not be compiled.") endif() diff --git a/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt b/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt index 6898456fc8ca..889c647ff9d8 100644 --- a/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt @@ -57,12 +57,10 @@ if(Boost_FILESYSTEM_FOUND) if(VTK_LIBRARIES) target_compile_definitions(io_image_plugin PRIVATE -DCGAL_USE_VTK -DNOMINMAX) endif() - if(TARGET Boost::filesystem) - target_link_libraries(io_image_plugin PUBLIC Boost::filesystem - Boost::system) - else() - target_link_libraries(io_image_plugin PUBLIC ${Boost_LIBRARIES}) - endif() + + target_link_libraries(io_image_plugin PUBLIC Boost::filesystem + Boost::system) + else() message(STATUS "NOTICE: the Io_image_plugin requires boost-filesystem, and will not be compiled") endif() From 63d2a26c00d79ead0a370e82588e190a2b5cf7a6 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Oct 2024 13:21:51 +0100 Subject: [PATCH 14/29] Use Boost::serialization and Boost::iostreams --- Classification/examples/Classification/CMakeLists.txt | 10 ++++------ Classification/test/Classification/CMakeLists.txt | 10 ++++------ Lab/demo/Lab/Plugins/Classification/CMakeLists.txt | 11 +++++------ Mesh_3/benchmark/Mesh_3/CMakeLists.txt | 7 ++----- 4 files changed, 15 insertions(+), 23 deletions(-) diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index 61060474db98..9be4f7fdad1b 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -10,15 +10,13 @@ find_package(CGAL REQUIRED) set(Classification_dependencies_met TRUE) find_package(Boost OPTIONAL_COMPONENTS serialization iostreams) -include(CGAL_Boost_serialization_support) -include(CGAL_Boost_iostreams_support) -if(NOT TARGET CGAL::Boost_serialization_support) +if(NOT TARGET Boost::serialization) message("NOTICE: This project requires Boost Serialization, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() -if(NOT TARGET CGAL::Boost_iostreams_support) +if(NOT TARGET Boost::iostreams) message("NOTICE: This project requires Boost IO Streams, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() @@ -69,8 +67,8 @@ foreach(target example_deprecated_conversion) if(TARGET ${target}) target_link_libraries(${target} PRIVATE CGAL::Eigen3_support - CGAL::Boost_iostreams_support - CGAL::Boost_serialization_support) + Boost::iostreams + Boost::serialization) if(TARGET CGAL::TBB_support) target_link_libraries(${target} PRIVATE CGAL::TBB_support) endif() diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index 8b3ccbf3da3c..aa5d323ba53a 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -10,15 +10,13 @@ find_package(CGAL REQUIRED) set(Classification_dependencies_met TRUE) find_package(Boost OPTIONAL_COMPONENTS serialization iostreams) -include(CGAL_Boost_serialization_support) -include(CGAL_Boost_iostreams_support) -if(NOT TARGET CGAL::Boost_serialization_support) +if(NOT TARGET Boost::serialization) message("NOTICE: This project requires Boost Serialization, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() -if(NOT TARGET CGAL::Boost_iostreams_support) +if(NOT TARGET Boost::iostreams) message("NOTICE: This project requires Boost IO Streams, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() @@ -42,8 +40,8 @@ create_single_source_cgal_program("test_classification_io.cpp") foreach(target test_classification_point_set test_classification_io) target_link_libraries(${target} PRIVATE CGAL::Eigen3_support - CGAL::Boost_iostreams_support - CGAL::Boost_serialization_support) + Boost::iostreams + Boost::serialization) if(TARGET CGAL::TBB_support) target_link_libraries(${target} PRIVATE CGAL::TBB_support) endif() diff --git a/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt b/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt index dabd10ef5276..ab5190aac749 100644 --- a/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt @@ -3,9 +3,8 @@ include(CGALlab_macros) if(TARGET CGAL::Eigen3_support) find_package(Boost QUIET OPTIONAL_COMPONENTS serialization iostreams) - include(CGAL_Boost_serialization_support) - include(CGAL_Boost_iostreams_support) - if(NOT TARGET CGAL::Boost_serialization_support OR NOT TARGET CGAL::Boost_iostreams_support) + + if(NOT TARGET Boost::serialization OR NOT TARGET Boost::iostreams message(STATUS "NOTICE: Boost IO Streams and/or Serialization not found, reading deprecated Classification config files won't be possible.") endif() @@ -47,9 +46,9 @@ if(TARGET CGAL::Eigen3_support) PROPERTIES RESOURCE_LOCK Selection_test_resources) endif() - if(TARGET CGAL::Boost_serialization_support AND TARGET CGAL::Boost_iostreams_support) - target_link_libraries(classification_plugin PRIVATE CGAL::Boost_serialization_support - CGAL::Boost_iostreams_support) + if(TARGET Boost::serialization AND TARGET Boost::iostreams) + target_link_libraries(classification_plugin PRIVATE Boost::serialization + Boost::iostreams) endif() if(TARGET CGAL::OpenCV_support) diff --git a/Mesh_3/benchmark/Mesh_3/CMakeLists.txt b/Mesh_3/benchmark/Mesh_3/CMakeLists.txt index bc7a8944cb7b..dcb7518f288a 100644 --- a/Mesh_3/benchmark/Mesh_3/CMakeLists.txt +++ b/Mesh_3/benchmark/Mesh_3/CMakeLists.txt @@ -41,9 +41,6 @@ endif() # Link with Boost.ProgramOptions (optional) find_package(Boost QUIET COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) - if(TARGET Boost::program_options) - target_link_libraries(benchmark_mesh_3 PRIVATE Boost::program_options) - else() - target_link_libraries(benchmark_mesh_3 PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) - endif() +target_link_libraries(benchmark_mesh_3 PRIVATE Boost::program_options) + endif() From 4bde1e658e6827589f0dc473718f82f5dfd42e4c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Oct 2024 07:39:00 +0100 Subject: [PATCH 15/29] missing ) --- Lab/demo/Lab/Plugins/Classification/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt b/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt index ab5190aac749..a048c4f7eb1b 100644 --- a/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt @@ -4,7 +4,7 @@ if(TARGET CGAL::Eigen3_support) find_package(Boost QUIET OPTIONAL_COMPONENTS serialization iostreams) - if(NOT TARGET Boost::serialization OR NOT TARGET Boost::iostreams + if(NOT TARGET Boost::serialization OR NOT TARGET Boost::iostreams) message(STATUS "NOTICE: Boost IO Streams and/or Serialization not found, reading deprecated Classification config files won't be possible.") endif() From ec895d6924ce82327b795a23ce6f4ad80c4cdaca Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Oct 2024 09:27:15 +0100 Subject: [PATCH 16/29] Simplified CMakeLists of Point_set_processing @soesau please check --- .../Point_set_processing_3/CMakeLists.txt | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) 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 85e72510b3b5..e4e4c9962fe0 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 @@ -22,13 +22,9 @@ endif() # Activate concurrency? option(CGAL_ACTIVATE_CONCURRENT_PSP3 "Enable concurrency" OFF) -set(CGAL_libs CGAL::CGAL) if(CGAL_ACTIVATE_CONCURRENT_PSP3 OR "$ENV{CGAL_ACTIVATE_CONCURRENT_PSP3}") find_package(TBB REQUIRED) include(CGAL_TBB_support) - if(TARGET CGAL::TBB_support) - set(CGAL_TBB_target ${CGAL_libs} CGAL::TBB_support) - endif() endif() # Executables that do *not* require EIGEN @@ -48,7 +44,7 @@ foreach( read_ply_points_with_colors_example write_ply_points_example) create_single_source_cgal_program("${target}.cpp") - target_link_libraries(${target} PRIVATE ${CGAL_libs}) + target_link_libraries(${target} PRIVATE CGAL::CGAL) endforeach() #disable if MSVC 2017 @@ -58,8 +54,8 @@ if(NOT MSVC_VERSION OR MSVC_VERSION GREATER_EQUAL 1919 OR MSVC_VERSION LESS 1910 if (TARGET CGAL::LASLIB_support) create_single_source_cgal_program("read_las_example.cpp") create_single_source_cgal_program("write_las_example.cpp") - target_link_libraries(read_las_example PRIVATE ${CGAL_libs} CGAL::LASLIB_support) - target_link_libraries(write_las_example PRIVATE ${CGAL_libs} CGAL::LASLIB_support) + target_link_libraries(read_las_example PRIVATE CGAL::CGAL CGAL::LASLIB_support) + target_link_libraries(write_las_example PRIVATE CGAL::CGAL CGAL::LASLIB_support) target_compile_definitions(read_las_example PRIVATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS) target_compile_definitions(write_las_example PRIVATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS) @@ -75,8 +71,6 @@ endif() find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) - set(CGAL_libs ${CGAL_libs} CGAL::Eigen3_support) - # Executables that require Eigen foreach( target @@ -90,11 +84,11 @@ if(TARGET CGAL::Eigen3_support) hierarchy_simplification_example normals_example) create_single_source_cgal_program("${target}.cpp") - target_link_libraries(${target} PRIVATE ${CGAL_libs}) + target_link_libraries(${target} PRIVATE CGAL::CGAL CGAL::Eigen3_support) endforeach() if (TARGET CGAL::Eigen3_support AND TARGET CGAL::LASLIB_support) create_single_source_cgal_program( "orient_scanlines_example.cpp" ) - target_link_libraries(orient_scanlines_example PRIVATE ${CGAL_libs} + target_link_libraries(orient_scanlines_example PRIVATE CGAL::CGAL CGAL::Eigen3_support CGAL::LASLIB_support) endif() @@ -103,7 +97,7 @@ if(TARGET CGAL::Eigen3_support) include(CGAL_pointmatcher_support) if(TARGET CGAL::pointmatcher_support) create_single_source_cgal_program("registration_with_pointmatcher.cpp") - target_link_libraries(registration_with_pointmatcher PRIVATE ${CGAL_libs} + target_link_libraries(registration_with_pointmatcher PRIVATE CGAL::CGAL CGAL::Eigen3_support CGAL::pointmatcher_support) else() message(STATUS "NOTICE: registration with pointmatcher requires libpointmatcher and will not be compiled.") @@ -121,7 +115,7 @@ if(TARGET CGAL::Eigen3_support) if(TARGET CGAL::OpenGR_support) create_single_source_cgal_program("registration_with_OpenGR.cpp") - target_link_libraries(registration_with_OpenGR PRIVATE ${CGAL_libs} + target_link_libraries(registration_with_OpenGR PRIVATE CGAL::CGAL CGAL::Eigen3_support CGAL::OpenGR_support) else() message(STATUS "NOTICE: registration_with_OpenGR requires OpenGR, and will not be compiled.") @@ -132,7 +126,7 @@ if(TARGET CGAL::Eigen3_support) TARGET CGAL::OpenGR_support) create_single_source_cgal_program("registration_with_opengr_pointmatcher_pipeline.cpp") target_link_libraries( - registration_with_opengr_pointmatcher_pipeline PRIVATE ${CGAL_libs} + registration_with_opengr_pointmatcher_pipeline PRIVATE CGAL::CGAL CGAL::Eigen3_support CGAL::pointmatcher_support CGAL::OpenGR_support) else() message(STATUS "NOTICE: registration with OpenGR and pointmatcher requires both libpointmatcher and OpenGR, and will not be compiled.") From 9edf6eadc7a93ef451b184d0b2cc3355fcec9412 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Oct 2024 13:35:15 +0100 Subject: [PATCH 17/29] Cleanup in Shape_detection --- .../test/Shape_detection/CMakeLists.txt | 16 +--- .../test_validity_sampled_data.cpp | 79 ------------------- 2 files changed, 3 insertions(+), 92 deletions(-) diff --git a/Shape_detection/test/Shape_detection/CMakeLists.txt b/Shape_detection/test/Shape_detection/CMakeLists.txt index 2f4245f2f762..503af515ccfa 100644 --- a/Shape_detection/test/Shape_detection/CMakeLists.txt +++ b/Shape_detection/test/Shape_detection/CMakeLists.txt @@ -49,19 +49,9 @@ if(TARGET CGAL::Eigen3_support) endforeach() set(RANSAC_PROTO_DIR CACHE PATH "") - if(NOT RANSAC_PROTO_DIR STREQUAL "") - add_compile_definitions(-DPOINTSWITHINDEX -DCGAL_TEST_RANSAC_PROTOTYPE) - include_directories(${RANSAC_PROTO_DIR}) - include_directories(${RANSAC_PROTO_DIR}/MiscLib/) - file(GLOB proto_src "${RANSAC_PROTO_DIR}/*.cpp") - file(GLOB proto_misc_src "${RANSAC_PROTO_DIR}/MiscLib/*.cpp") - add_library(libproto STATIC ${proto_src} ${proto_misc_src}) - add_executable(test_validity_sampled_data "test_validity_sampled_data.cpp") - target_link_libraries(test_validity_sampled_data libproto CGAL::CGAL CGAL::Data CGAL::Eigen3_support) - else() - add_executable(test_validity_sampled_data "test_validity_sampled_data.cpp") - target_link_libraries(test_validity_sampled_data CGAL::CGAL CGAL::Data CGAL::Eigen3_support) - endif() + + add_executable(test_validity_sampled_data "test_validity_sampled_data.cpp") + target_link_libraries(test_validity_sampled_data CGAL::CGAL CGAL::Data CGAL::Eigen3_support) cgal_add_test(test_validity_sampled_data) else() message(STATUS "NOTICE: Some tests require Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Shape_detection/test/Shape_detection/test_validity_sampled_data.cpp b/Shape_detection/test/Shape_detection/test_validity_sampled_data.cpp index 8e073a0750a6..6381eda2f673 100644 --- a/Shape_detection/test/Shape_detection/test_validity_sampled_data.cpp +++ b/Shape_detection/test/Shape_detection/test_validity_sampled_data.cpp @@ -4,12 +4,6 @@ #include #include -#ifdef CGAL_TEST_RANSAC_PROTOTYPE -#include -#include -#include -#include -#endif #include #include @@ -179,78 +173,5 @@ void test_copied_point_cloud (const Point_set& original_points, std::size_t nb) // RANSAC should detect at least 75% of shapes. assert (detected_ransac[detected_ransac.size() / 2] > std::size_t(0.75 * ground_truth)); -#ifdef CGAL_TEST_RANSAC_PROTOTYPE - { - CGAL::Real_timer timer; - double timeout = 120.; // 2 minutes timeout - timer.start(); - std::size_t nb_runs = 500; - std::vector detected_ransac; - std::vector times_ransac; - for (std::size_t run = 0; run < nb_runs; ++ run) - { - PointCloud proto_points; - proto_points.reserve (points.size()); - - Point Pt; - for (std::size_t i = 0; i < points.size(); ++i) - { - Pt.pos[0] = static_cast(points[i].first.x()); - Pt.pos[1] = static_cast(points[i].first.y()); - Pt.pos[2] = static_cast(points[i].first.z()); - Pt.normal[0] = static_cast(points[i].second.x()); - Pt.normal[1] = static_cast(points[i].second.y()); - Pt.normal[2] = static_cast(points[i].second.z()); -#ifdef POINTSWITHINDEX - Pt.index = i; -#endif - proto_points.push_back(Pt); - } - - // Manually set bounding box! - Vec3f cbbMin, cbbMax; - cbbMin[0] = static_cast(bbox.xmin()); - cbbMin[1] = static_cast(bbox.ymin()); - cbbMin[2] = static_cast(bbox.zmin()); - cbbMax[0] = static_cast(bbox.xmax()); - cbbMax[1] = static_cast(bbox.ymax()); - cbbMax[2] = static_cast(bbox.zmax()); - proto_points.setBBox(cbbMin, cbbMax); - - // Sets parameters for shape detection. - RansacShapeDetector::Options options; - options.m_epsilon = parameters.epsilon; - options.m_bitmapEpsilon = parameters.cluster_epsilon; - options.m_normalThresh = parameters.normal_threshold; - options.m_probability = parameters.probability; - options.m_minSupport = parameters.min_points; - - CGAL::Real_timer t; - t.start(); - RansacShapeDetector ransac (options); // the detector object - ransac.Add (new PlanePrimitiveShapeConstructor()); - MiscLib::Vector, std::size_t> > shapes; // stores the detected shapes - ransac.Detect (proto_points, 0, proto_points.size(), &shapes); - t.stop(); - - detected_ransac.emplace_back (shapes.size()); - times_ransac.emplace_back (t.time() * 1000); - if (timer.time() > timeout) - { - nb_runs = run + 1; - break; - } - } - - std::sort (detected_ransac.begin(), detected_ransac.end()); - std::sort (times_ransac.begin(), times_ransac.end()); - std::cerr << "RANSAC (proto) = " << detected_ransac[detected_ransac.size() / 2] - << " planes (" << times_ransac[times_ransac.size() / 2] << "ms) (on " - << nb_runs << " runs, planes[" - << detected_ransac.front() << ";" << detected_ransac.back() << "], time[" - << times_ransac.front() << ";" << times_ransac.back() << "])" << std::endl; - } -#endif - std::cerr << std::endl; } From 2ca1c4edc18a5e4599481715926c6f59390799af Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 14 Oct 2024 17:37:19 +0200 Subject: [PATCH 18/29] first batch of modifications during my review [skip ci] (wait for the second batch of modifications) --- .../examples/Classification/CMakeLists.txt | 10 +-- .../test/Classification/CMakeLists.txt | 10 +-- .../CGAL_CreateSingleSourceCGALProgram.cmake | 4 -- Lab/demo/Lab/CMakeLists.txt | 62 +++++++++---------- Lab/demo/Lab/Plugins/AABB_tree/CMakeLists.txt | 4 +- .../Lab/Plugins/Alpha_wrap_3/CMakeLists.txt | 2 +- .../Plugins/Camera_position/CMakeLists.txt | 2 +- .../Lab/Plugins/Classification/CMakeLists.txt | 13 ++-- .../Convex_decomposition/CMakeLists.txt | 2 +- .../Lab/Plugins/Convex_hull/CMakeLists.txt | 4 +- Lab/demo/Lab/Plugins/Display/CMakeLists.txt | 16 ++--- Lab/demo/Lab/Plugins/IO/CMakeLists.txt | 32 +++++----- .../Lab/Plugins/Isosurfacing_3/CMakeLists.txt | 2 +- Lab/demo/Lab/Plugins/Mesh_2/CMakeLists.txt | 2 +- Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt | 16 ++--- .../Operations_on_polyhedra/CMakeLists.txt | 12 ++-- Lab/demo/Lab/Plugins/PCA/CMakeLists.txt | 50 +++++++-------- Lab/demo/Lab/Plugins/PMP/CMakeLists.txt | 50 +++++++-------- Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt | 60 +++++++++--------- .../Subdivision_methods/CMakeLists.txt | 2 +- .../Lab/Plugins/Surface_mesh/CMakeLists.txt | 10 +-- .../Surface_mesh_deformation/CMakeLists.txt | 2 +- .../Tetrahedral_remeshing/CMakeLists.txt | 2 +- .../Lab/Plugins/Three_examples/CMakeLists.txt | 2 +- Lab/demo/Lab/Scene_image_item.cpp | 2 - 25 files changed, 186 insertions(+), 187 deletions(-) diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index 9be4f7fdad1b..61060474db98 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -10,13 +10,15 @@ find_package(CGAL REQUIRED) set(Classification_dependencies_met TRUE) find_package(Boost OPTIONAL_COMPONENTS serialization iostreams) +include(CGAL_Boost_serialization_support) +include(CGAL_Boost_iostreams_support) -if(NOT TARGET Boost::serialization) +if(NOT TARGET CGAL::Boost_serialization_support) message("NOTICE: This project requires Boost Serialization, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() -if(NOT TARGET Boost::iostreams) +if(NOT TARGET CGAL::Boost_iostreams_support) message("NOTICE: This project requires Boost IO Streams, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() @@ -67,8 +69,8 @@ foreach(target example_deprecated_conversion) if(TARGET ${target}) target_link_libraries(${target} PRIVATE CGAL::Eigen3_support - Boost::iostreams - Boost::serialization) + CGAL::Boost_iostreams_support + CGAL::Boost_serialization_support) if(TARGET CGAL::TBB_support) target_link_libraries(${target} PRIVATE CGAL::TBB_support) endif() diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index aa5d323ba53a..8b3ccbf3da3c 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -10,13 +10,15 @@ find_package(CGAL REQUIRED) set(Classification_dependencies_met TRUE) find_package(Boost OPTIONAL_COMPONENTS serialization iostreams) +include(CGAL_Boost_serialization_support) +include(CGAL_Boost_iostreams_support) -if(NOT TARGET Boost::serialization) +if(NOT TARGET CGAL::Boost_serialization_support) message("NOTICE: This project requires Boost Serialization, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() -if(NOT TARGET Boost::iostreams) +if(NOT TARGET CGAL::Boost_iostreams_support) message("NOTICE: This project requires Boost IO Streams, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() @@ -40,8 +42,8 @@ create_single_source_cgal_program("test_classification_io.cpp") foreach(target test_classification_point_set test_classification_io) target_link_libraries(${target} PRIVATE CGAL::Eigen3_support - Boost::iostreams - Boost::serialization) + CGAL::Boost_iostreams_support + CGAL::Boost_serialization_support) if(TARGET CGAL::TBB_support) target_link_libraries(${target} PRIVATE CGAL::TBB_support) endif() diff --git a/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake b/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake index c51173216b3f..d6d992267bb5 100644 --- a/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake +++ b/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake @@ -23,10 +23,6 @@ function(create_single_source_cgal_program firstfile ) if(EXISTS "${firstfile}") - if(CXX_FEATURES AND NOT COMMAND target_compile_features) - message(STATUS "NOTICE: ${exe_name}.cpp requires a CMake version >= 3.1 to detect C++ features, and will not be compiled.") - return() - endif() if(CXX_FEATURES) set(MISSING_CXX_FEATURES ${CXX_FEATURES}) if(CMAKE_CXX_COMPILE_FEATURES) diff --git a/Lab/demo/Lab/CMakeLists.txt b/Lab/demo/Lab/CMakeLists.txt index 41b160690619..f81c8c2a243d 100644 --- a/Lab/demo/Lab/CMakeLists.txt +++ b/Lab/demo/Lab/CMakeLists.txt @@ -49,7 +49,6 @@ set_package_properties( if(Qt6_FOUND) add_compile_definitions(-DQT_NO_KEYWORDS) - add_compile_definitions(-DSCENE_IMAGE_GL_BUFFERS_AVAILABLE) endif(Qt6_FOUND) find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) @@ -186,10 +185,10 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) Primitive_container.cpp CGALlab_plugin_helper.cpp CGAL_double_edit.cpp) - target_link_libraries(demo_framework PUBLIC Qt6::OpenGLWidgets Qt6::Widgets Qt6::Gui Qt6::Qml - CGAL::CGAL_Qt6) + target_link_libraries(demo_framework PRIVATE Qt6::OpenGLWidgets Qt6::Widgets Qt6::Gui + PUBLIC CGAL::CGAL_Qt6) if(TARGET Qt6::WebSockets) - target_link_libraries(demo_framework PUBLIC Qt6::WebSockets) + target_link_libraries(demo_framework PRIVATE Qt6::WebSockets) message(STATUS "Qt6WebSockets was found. Using WebSockets is therefore possible.") endif() @@ -216,8 +215,8 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) add_library(scene_basic_objects SHARED Scene_plane_item.cpp Scene_spheres_item.cpp) target_link_libraries( - scene_basic_objects PUBLIC demo_framework CGAL::CGAL_Qt6 Qt6::OpenGLWidgets - Qt6::Gui Qt6::Widgets) + scene_basic_objects PRIVATE demo_framework CGAL::CGAL_Qt6 Qt6::OpenGLWidgets + Qt6::Gui Qt6::Widgets) add_library(scene_color_ramp SHARED Color_ramp.cpp) target_link_libraries(scene_color_ramp PRIVATE Qt6::Core) @@ -226,26 +225,26 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) add_library(point_dialog SHARED Show_point_dialog.cpp Show_point_dialog.ui ${Show_point_dialogUI_FILES}) - target_link_libraries(point_dialog PUBLIC Qt6::OpenGLWidgets Qt6::Gui + target_link_libraries(point_dialog PRIVATE Qt6::OpenGLWidgets Qt6::Gui Qt6::Widgets) cgal_add_compilation_test(point_dialog) macro(add_item item_name) add_library(${item_name} SHARED ${ARGN}) target_link_libraries( - ${item_name} PUBLIC demo_framework CGAL::CGAL_Qt6 Qt6::OpenGLWidgets Qt6::Gui - Qt6::Widgets) + ${item_name} PRIVATE demo_framework CGAL::CGAL_Qt6 Qt6::OpenGLWidgets Qt6::Gui + Qt6::Widgets) cgal_add_compilation_test(${item_name}) add_to_cached_list(CGAL_EXECUTABLE_TARGETS ${item_name}) CGAL_install_hooks() endmacro(add_item) add_item(scene_triangulation_3_item Scene_triangulation_3_item.cpp) - target_link_libraries(scene_triangulation_3_item PUBLIC scene_basic_objects scene_edit_box_item) + target_link_libraries(scene_triangulation_3_item PRIVATE scene_basic_objects scene_edit_box_item) add_item(scene_c3t3_item Scene_c3t3_item.cpp) target_link_libraries( - scene_c3t3_item PUBLIC scene_triangulation_3_item + scene_c3t3_item PRIVATE scene_triangulation_3_item scene_surface_mesh_item scene_polygon_soup_item scene_basic_objects ${TBB_LIBRARIES}) @@ -258,19 +257,19 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) target_precompile_headers(scene_c3t3_item PUBLIC [["C3t3_type.h"]]) endif() add_item(scene_tetrahedra_item Scene_tetrahedra_item.cpp) - target_link_libraries(scene_tetrahedra_item PUBLIC scene_c3t3_item) + target_link_libraries(scene_tetrahedra_item PRIVATE scene_c3t3_item) add_item(scene_aff_transformed_item Plugins/PCA/Scene_aff_transformed_item.cpp) add_item(scene_aff_transformed_point_set_item Plugins/PCA/Scene_aff_transformed_point_set_item.cpp) - target_link_libraries(scene_aff_transformed_point_set_item PUBLIC scene_points_with_normal_item - scene_aff_transformed_item) + target_link_libraries(scene_aff_transformed_point_set_item PRIVATE scene_points_with_normal_item + scene_aff_transformed_item) add_item(scene_aff_transformed_polygon_soup_item Plugins/PCA/Scene_aff_transformed_polygon_soup_item.cpp) - target_link_libraries(scene_aff_transformed_polygon_soup_item PUBLIC scene_polygon_soup_item - scene_aff_transformed_item) + target_link_libraries(scene_aff_transformed_polygon_soup_item PRIVATE scene_polygon_soup_item + scene_aff_transformed_item) add_item(scene_aff_transformed_surface_mesh_item Plugins/PCA/Scene_aff_transformed_surface_mesh_item.cpp) - target_link_libraries(scene_aff_transformed_surface_mesh_item PUBLIC scene_surface_mesh_item - scene_aff_transformed_item) + target_link_libraries(scene_aff_transformed_surface_mesh_item PRIVATE scene_surface_mesh_item + scene_aff_transformed_item) add_item(scene_edit_box_item Plugins/PCA/Scene_edit_box_item.cpp) @@ -283,15 +282,15 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) # special add_item(scene_item_decorator Scene_polyhedron_item_decorator.cpp) - target_link_libraries(scene_item_decorator PUBLIC scene_surface_mesh_item) + target_link_libraries(scene_item_decorator PRIVATE scene_surface_mesh_item) add_item(scene_k_ring_selection Plugins/PMP/Scene_facegraph_item_k_ring_selection.cpp) - target_link_libraries(scene_k_ring_selection PUBLIC scene_surface_mesh_item) + target_link_libraries(scene_k_ring_selection PRIVATE scene_surface_mesh_item) add_item(scene_selection_item Scene_polyhedron_selection_item.cpp) - target_link_libraries(scene_selection_item PUBLIC scene_item_decorator - scene_k_ring_selection) + target_link_libraries(scene_selection_item PRIVATE scene_item_decorator + scene_k_ring_selection) if(TBB_FOUND) target_link_libraries(scene_selection_item PRIVATE CGAL::TBB_support) endif() @@ -300,7 +299,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp) target_link_libraries( scene_shortest_path_item - PUBLIC scene_item_decorator scene_surface_mesh_item scene_polylines_item) + PRIVATE scene_item_decorator scene_surface_mesh_item scene_polylines_item) add_item(scene_movable_sm_item Plugins/AABB_tree/Scene_movable_sm_item.cpp) @@ -313,14 +312,14 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) endif() add_item(scene_implicit_function_item Scene_implicit_function_item.cpp) - target_link_libraries(scene_implicit_function_item PUBLIC scene_color_ramp) + target_link_libraries(scene_implicit_function_item PRIVATE scene_color_ramp) add_item(scene_polygon_soup_item Scene_polygon_soup_item.cpp) - target_link_libraries(scene_polygon_soup_item PUBLIC scene_surface_mesh_item) + target_link_libraries(scene_polygon_soup_item PRIVATE scene_surface_mesh_item) add_item(scene_nef_polyhedron_item Scene_nef_polyhedron_item.cpp) target_link_libraries(scene_nef_polyhedron_item - PUBLIC scene_surface_mesh_item) + PRIVATE scene_surface_mesh_item) add_item(scene_points_with_normal_item Scene_points_with_normal_item.cpp) if(TARGET CGAL::Eigen3_support) @@ -335,8 +334,8 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) add_item(scene_polylines_item Scene_polylines_item.cpp) target_link_libraries( - scene_polylines_item PUBLIC scene_basic_objects - scene_points_with_normal_item) + scene_polylines_item PRIVATE scene_basic_objects + scene_points_with_normal_item) add_item(scene_lcc_item Scene_lcc_item.cpp) @@ -360,8 +359,9 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) ${statisticsUI_FILES} ${SubViewerUI_files}) target_link_libraries( - cgal_lab PUBLIC demo_framework point_dialog Qt6::Gui Qt6::OpenGLWidgets - Qt6::Widgets ) + cgal_lab PRIVATE demo_framework point_dialog Qt6::Widgets + PUBLIC Qt6::Gui Qt6::OpenGLWidgets Qt6::Qml + ) if(LIBSSH_FOUND) target_compile_definitions(cgal_lab PRIVATE -DCGAL_USE_SSH) target_link_libraries(cgal_lab PRIVATE ${LIBSSH_LIBRARIES}) @@ -420,7 +420,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) #WS Server if(TARGET Qt6::WebSockets AND TARGET Qt6::Network) add_executable(WS_server Server_ws.cpp) - target_link_libraries(WS_server PUBLIC Qt6::WebSockets Qt6::Widgets Qt6::Network) + target_link_libraries(WS_server PRIVATE Qt6::WebSockets Qt6::Widgets Qt6::Network) message(STATUS "Qt6WebSockets was found. Using WebSockets is therefore possible.") endif() # diff --git a/Lab/demo/Lab/Plugins/AABB_tree/CMakeLists.txt b/Lab/demo/Lab/Plugins/AABB_tree/CMakeLists.txt index 3a4f0aee0a30..a4c713f5d1be 100644 --- a/Lab/demo/Lab/Plugins/AABB_tree/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/AABB_tree/CMakeLists.txt @@ -1,11 +1,11 @@ include(CGALlab_macros) cgal_lab_plugin(do_trees_intersect_plugin Do_trees_intersect_plugin) -target_link_libraries(do_trees_intersect_plugin PUBLIC scene_surface_mesh_item +target_link_libraries(do_trees_intersect_plugin PRIVATE scene_surface_mesh_item scene_movable_sm_item) cgal_lab_plugin(cut_plugin Cut_plugin) -target_link_libraries(cut_plugin PUBLIC scene_surface_mesh_item +target_link_libraries(cut_plugin PRIVATE scene_surface_mesh_item scene_basic_objects scene_color_ramp) if(TARGET CGAL::TBB_support) target_link_libraries(cut_plugin PRIVATE CGAL::TBB_support) diff --git a/Lab/demo/Lab/Plugins/Alpha_wrap_3/CMakeLists.txt b/Lab/demo/Lab/Plugins/Alpha_wrap_3/CMakeLists.txt index f7097e719e9e..876265b7be1a 100644 --- a/Lab/demo/Lab/Plugins/Alpha_wrap_3/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Alpha_wrap_3/CMakeLists.txt @@ -5,4 +5,4 @@ qt6_wrap_ui(alpha_wrap_3UI_FILES alpha_wrap_3_dialog.ui) cgal_lab_plugin(alpha_wrap_3_plugin Alpha_wrap_3_plugin ${alpha_wrap_3UI_FILES}) #if the plugin uses external libraries like scene_items -target_link_libraries(alpha_wrap_3_plugin PUBLIC scene_surface_mesh_item scene_polygon_soup_item scene_points_with_normal_item scene_selection_item scene_polylines_item) +target_link_libraries(alpha_wrap_3_plugin PRIVATE scene_surface_mesh_item scene_polygon_soup_item scene_points_with_normal_item scene_selection_item scene_polylines_item) diff --git a/Lab/demo/Lab/Plugins/Camera_position/CMakeLists.txt b/Lab/demo/Lab/Plugins/Camera_position/CMakeLists.txt index 034f5a430505..840ccfa5bb8f 100644 --- a/Lab/demo/Lab/Plugins/Camera_position/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Camera_position/CMakeLists.txt @@ -8,4 +8,4 @@ cgal_lab_plugin(camera_positions_plugin KEYWORDS Viewer) add_dependencies(camera_positions_plugin demo_framework) -target_link_libraries(camera_positions_plugin PUBLIC demo_framework) +target_link_libraries(camera_positions_plugin PRIVATE demo_framework) diff --git a/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt b/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt index a048c4f7eb1b..a2e4c681a0f7 100644 --- a/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt @@ -3,8 +3,9 @@ include(CGALlab_macros) if(TARGET CGAL::Eigen3_support) find_package(Boost QUIET OPTIONAL_COMPONENTS serialization iostreams) - - if(NOT TARGET Boost::serialization OR NOT TARGET Boost::iostreams) + include(CGAL_Boost_serialization_support) + include(CGAL_Boost_iostreams_support) + if(NOT TARGET CGAL::Boost_serialization_support OR NOT TARGET CGAL::Boost_iostreams_support) message(STATUS "NOTICE: Boost IO Streams and/or Serialization not found, reading deprecated Classification config files won't be possible.") endif() @@ -32,7 +33,7 @@ if(TARGET CGAL::Eigen3_support) Classification) target_link_libraries( classification_plugin - PUBLIC scene_points_with_normal_item + PRIVATE scene_points_with_normal_item scene_polylines_item scene_polygon_soup_item scene_surface_mesh_item @@ -46,9 +47,9 @@ if(TARGET CGAL::Eigen3_support) PROPERTIES RESOURCE_LOCK Selection_test_resources) endif() - if(TARGET Boost::serialization AND TARGET Boost::iostreams) - target_link_libraries(classification_plugin PRIVATE Boost::serialization - Boost::iostreams) + if(TARGET CGAL::Boost_serialization_support AND TARGET CGAL::Boost_iostreams_support) + target_link_libraries(classification_plugin PRIVATE CGAL::Boost_serialization_support + CGAL::Boost_iostreams_support) endif() if(TARGET CGAL::OpenCV_support) diff --git a/Lab/demo/Lab/Plugins/Convex_decomposition/CMakeLists.txt b/Lab/demo/Lab/Plugins/Convex_decomposition/CMakeLists.txt index a4b630fad160..683824fbeaa6 100644 --- a/Lab/demo/Lab/Plugins/Convex_decomposition/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Convex_decomposition/CMakeLists.txt @@ -1,4 +1,4 @@ include(CGALlab_macros) cgal_lab_plugin(nef_plugin Nef_plugin) -target_link_libraries(nef_plugin PUBLIC scene_nef_polyhedron_item) +target_link_libraries(nef_plugin PRIVATE scene_nef_polyhedron_item) diff --git a/Lab/demo/Lab/Plugins/Convex_hull/CMakeLists.txt b/Lab/demo/Lab/Plugins/Convex_hull/CMakeLists.txt index 4222c6320c7f..019615e46379 100644 --- a/Lab/demo/Lab/Plugins/Convex_hull/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Convex_hull/CMakeLists.txt @@ -3,11 +3,11 @@ include(CGALlab_macros) cgal_lab_plugin(convex_hull_plugin Convex_hull_plugin KEYWORDS PointSetProcessing) target_link_libraries( - convex_hull_plugin PUBLIC scene_points_with_normal_item scene_polylines_item + convex_hull_plugin PRIVATE scene_points_with_normal_item scene_polylines_item scene_selection_item scene_surface_mesh_item) cgal_lab_plugin(kernel_plugin Kernel_plugin) -target_link_libraries(kernel_plugin PUBLIC scene_surface_mesh_item) +target_link_libraries(kernel_plugin PRIVATE scene_surface_mesh_item) if(CGAL_ENABLE_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) diff --git a/Lab/demo/Lab/Plugins/Display/CMakeLists.txt b/Lab/demo/Lab/Plugins/Display/CMakeLists.txt index f1beddaf360e..392f1e33e4f3 100644 --- a/Lab/demo/Lab/Plugins/Display/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Display/CMakeLists.txt @@ -2,16 +2,16 @@ include(CGALlab_macros) qt6_wrap_ui(display_propertyUI_FILES Display_property.ui) cgal_lab_plugin(display_property_plugin Display_property_plugin ${display_propertyUI_FILES} KEYWORDS Viewer) -target_link_libraries(display_property_plugin PUBLIC scene_surface_mesh_item - scene_points_with_normal_item - scene_color_ramp - CGAL::Eigen3_support) +target_link_libraries(display_property_plugin PRIVATE scene_surface_mesh_item + scene_points_with_normal_item + scene_color_ramp + CGAL::Eigen3_support) if(TARGET CGAL::Eigen3_support) qt6_wrap_ui(heat_methodUI_FILES Heat_method.ui) cgal_lab_plugin(heat_method_plugin Heat_method_plugin ${heat_methodUI_FILES} KEYWORDS Viewer) - target_link_libraries(heat_method_plugin PUBLIC scene_surface_mesh_item - scene_selection_item - scene_color_ramp - CGAL::Eigen3_support) + target_link_libraries(heat_method_plugin PRIVATE scene_surface_mesh_item + scene_selection_item + scene_color_ramp + CGAL::Eigen3_support) endif() diff --git a/Lab/demo/Lab/Plugins/IO/CMakeLists.txt b/Lab/demo/Lab/Plugins/IO/CMakeLists.txt index 760a9c328972..91bd7c6e2614 100644 --- a/Lab/demo/Lab/Plugins/IO/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/IO/CMakeLists.txt @@ -13,39 +13,39 @@ endif() include(CGAL_LASLIB_support) cgal_lab_plugin(gocad_plugin GOCAD_io_plugin KEYWORDS Viewer) -target_link_libraries(gocad_plugin PUBLIC scene_surface_mesh_item) +target_link_libraries(gocad_plugin PRIVATE scene_surface_mesh_item) qt6_wrap_ui( funcUI_FILES Function_dialog.ui ) cgal_lab_plugin(io_implicit_function_plugin Implicit_function_io_plugin ${funcUI_FILES} KEYWORDS Viewer Mesh_3) -target_link_libraries(io_implicit_function_plugin PUBLIC scene_implicit_function_item) +target_link_libraries(io_implicit_function_plugin PRIVATE scene_implicit_function_item) cgal_lab_plugin(nef_io_plugin Nef_io_plugin KEYWORDS Viewer) -target_link_libraries(nef_io_plugin PUBLIC scene_nef_polyhedron_item) +target_link_libraries(nef_io_plugin PRIVATE scene_nef_polyhedron_item) cgal_lab_plugin(off_plugin OFF_io_plugin KEYWORDS Viewer Mesh_3 PointSetProcessing Classification PMP) -target_link_libraries(off_plugin PUBLIC scene_polygon_soup_item scene_points_with_normal_item scene_surface_mesh_item) +target_link_libraries(off_plugin PRIVATE scene_polygon_soup_item scene_points_with_normal_item scene_surface_mesh_item) cgal_lab_plugin(off_to_nef_plugin OFF_to_nef_io_plugin KEYWORDS Viewer) -target_link_libraries(off_to_nef_plugin PUBLIC scene_nef_polyhedron_item) +target_link_libraries(off_to_nef_plugin PRIVATE scene_nef_polyhedron_item) cgal_lab_plugin(polylines_io_plugin Polylines_io_plugin KEYWORDS Viewer Mesh_3) -target_link_libraries(polylines_io_plugin PUBLIC scene_polylines_item) +target_link_libraries(polylines_io_plugin PRIVATE scene_polylines_item) cgal_lab_plugin(wkt_plugin WKT_io_plugin KEYWORDS Viewer PointSetProcessing Mesh_3) -target_link_libraries(wkt_plugin PUBLIC scene_polylines_item) +target_link_libraries(wkt_plugin PRIVATE scene_polylines_item) cgal_lab_plugin(stl_plugin STL_io_plugin KEYWORDS Viewer PMP) -target_link_libraries(stl_plugin PUBLIC scene_surface_mesh_item scene_polygon_soup_item) +target_link_libraries(stl_plugin PRIVATE scene_surface_mesh_item scene_polygon_soup_item) cgal_lab_plugin(surf_io_plugin Surf_io_plugin KEYWORDS Viewer PMP) -target_link_libraries(surf_io_plugin PUBLIC scene_surface_mesh_item) +target_link_libraries(surf_io_plugin PRIVATE scene_surface_mesh_item) cgal_lab_plugin(lcc_io_plugin lcc_io_plugin KEYWORDS Viewer) -target_link_libraries(lcc_io_plugin PUBLIC scene_lcc_item) +target_link_libraries(lcc_io_plugin PRIVATE scene_lcc_item) find_package(VTK 9.0 QUIET COMPONENTS CommonCore IOCore IOLegacy IOXML FiltersCore FiltersSources) set_package_properties( @@ -54,29 +54,29 @@ set_package_properties( PURPOSE "Can be used for I/O (DICOM, VTU, VTP).") cgal_lab_plugin(triangulation_3_io_plugin triangulation_3_io_plugin KEYWORDS Viewer) -target_link_libraries(triangulation_3_io_plugin PUBLIC scene_triangulation_3_item) +target_link_libraries(triangulation_3_io_plugin PRIVATE scene_triangulation_3_item) if(VTK_FOUND AND VTK_LIBRARIES) message(STATUS "VTK ${VTK_VERSION} found ${VTK_LIBRARIES}") cgal_lab_plugin(vtk_plugin VTK_io_plugin KEYWORDS Viewer Mesh_3) - target_link_libraries(vtk_plugin PUBLIC scene_surface_mesh_item scene_polylines_item scene_c3t3_item scene_points_with_normal_item + target_link_libraries(vtk_plugin PRIVATE scene_surface_mesh_item scene_polylines_item scene_c3t3_item scene_points_with_normal_item ${VTK_LIBRARIES}) target_compile_definitions(vtk_plugin PRIVATE -DCGAL_USE_VTK -DNOMINMAX) else() message(STATUS "NOTICE: the vtk IO plugin needs VTK 9.0 or greater and will not be compiled.") endif() cgal_lab_plugin(xyz_plugin XYZ_io_plugin KEYWORDS Viewer PointSetProcessing Classification) -target_link_libraries(xyz_plugin PUBLIC scene_points_with_normal_item) +target_link_libraries(xyz_plugin PRIVATE scene_points_with_normal_item) cgal_lab_plugin(ply_plugin PLY_io_plugin KEYWORDS Viewer PointSetProcessing Classification PMP) -target_link_libraries(ply_plugin PUBLIC scene_points_with_normal_item scene_polygon_soup_item scene_surface_mesh_item scene_textured_item) +target_link_libraries(ply_plugin PRIVATE scene_points_with_normal_item scene_polygon_soup_item scene_surface_mesh_item scene_textured_item) if (TARGET CGAL::LASLIB_support) cgal_lab_plugin(las_plugin LAS_io_plugin KEYWORDS Viewer PointSetProcessing Classification) - target_link_libraries(las_plugin PUBLIC scene_points_with_normal_item CGAL::LASLIB_support) + target_link_libraries(las_plugin PRIVATE scene_points_with_normal_item CGAL::LASLIB_support) if(MSVC) target_compile_definitions( las_plugin - PUBLIC "-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS") + PRIVATE "-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS") endif() else() message(STATUS "NOTICE: the LAS IO plugin needs LAS libraries and will not be compiled.") diff --git a/Lab/demo/Lab/Plugins/Isosurfacing_3/CMakeLists.txt b/Lab/demo/Lab/Plugins/Isosurfacing_3/CMakeLists.txt index 110f77394888..1a8d1e429608 100644 --- a/Lab/demo/Lab/Plugins/Isosurfacing_3/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Isosurfacing_3/CMakeLists.txt @@ -3,4 +3,4 @@ include(CGALlab_macros) cgal_lab_plugin(isosurface_3_plugin Isosurface_3_plugin KEYWORDS Isosurface_3) target_link_libraries( - isosurface_3_plugin PUBLIC scene_polygon_soup_item scene_image_item ) + isosurface_3_plugin PRIVATE scene_polygon_soup_item scene_image_item ) diff --git a/Lab/demo/Lab/Plugins/Mesh_2/CMakeLists.txt b/Lab/demo/Lab/Plugins/Mesh_2/CMakeLists.txt index f5b4079bae5e..c2e925d04ffd 100644 --- a/Lab/demo/Lab/Plugins/Mesh_2/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Mesh_2/CMakeLists.txt @@ -4,5 +4,5 @@ qt6_wrap_ui(mesh_2UI_FILES mesh_2_dialog.ui) cgal_lab_plugin(mesh_2_plugin Mesh_2_plugin ${mesh_2UI_FILES}) #if the plugin uses external libraries like scene_items target_link_libraries( - mesh_2_plugin PUBLIC scene_surface_mesh_item scene_polylines_item + mesh_2_plugin PRIVATE scene_surface_mesh_item scene_polylines_item scene_points_with_normal_item) diff --git a/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt b/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt index 889c647ff9d8..8ca5ad54d5d9 100644 --- a/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt @@ -19,7 +19,7 @@ cgal_lab_plugin( Mesh_3) target_link_libraries( mesh_3_plugin - PUBLIC scene_polygon_soup_item + PRIVATE scene_polygon_soup_item scene_polylines_item scene_implicit_function_item scene_image_item @@ -53,12 +53,12 @@ if(Boost_FILESYSTEM_FOUND) ${imgUI_FILES} ${VOLUME_MOC_OUTFILES} KEYWORDS Viewer Mesh_3) - target_link_libraries(io_image_plugin PUBLIC scene_image_item ${VTK_LIBRARIES} CGAL::CGAL_ImageIO) + target_link_libraries(io_image_plugin PRIVATE scene_image_item ${VTK_LIBRARIES} CGAL::CGAL_ImageIO) if(VTK_LIBRARIES) target_compile_definitions(io_image_plugin PRIVATE -DCGAL_USE_VTK -DNOMINMAX) endif() - target_link_libraries(io_image_plugin PUBLIC Boost::filesystem + target_link_libraries(io_image_plugin PRIVATE Boost::filesystem Boost::system) else() @@ -74,7 +74,7 @@ cgal_lab_plugin( Mesh_3) target_link_libraries( mesh_3_optimization_plugin - PUBLIC scene_c3t3_item scene_surface_mesh_item scene_image_item + PRIVATE scene_c3t3_item scene_surface_mesh_item scene_image_item scene_implicit_function_item) # Use Eigen @@ -88,16 +88,16 @@ else() endif() cgal_lab_plugin(c3t3_io_plugin C3t3_io_plugin KEYWORDS Viewer Mesh_3) -target_link_libraries(c3t3_io_plugin PUBLIC scene_c3t3_item) +target_link_libraries(c3t3_io_plugin PRIVATE scene_c3t3_item) qt6_wrap_ui(tetraUI_FILES Tetrahedra_filter_widget.ui) cgal_lab_plugin(tetrahedra_filtering_plugin Tetrahedra_filtering_plugin ${tetraUI_FILES} KEYWORDS Mesh_3 Viewer) -target_link_libraries(tetrahedra_filtering_plugin PUBLIC scene_c3t3_item scene_tetrahedra_item) +target_link_libraries(tetrahedra_filtering_plugin PRIVATE scene_c3t3_item scene_tetrahedra_item) qt6_wrap_ui(ribUI_FILES Rib_dialog.ui) cgal_lab_plugin(c3t3_rib_exporter_plugin C3t3_rib_exporter_plugin ${ribUI_FILES} KEYWORDS Mesh_3) -target_link_libraries(c3t3_rib_exporter_plugin PUBLIC scene_c3t3_item) +target_link_libraries(c3t3_rib_exporter_plugin PRIVATE scene_c3t3_item) if(TBB_FOUND) target_link_libraries(mesh_3_plugin PRIVATE CGAL::TBB_support) @@ -109,7 +109,7 @@ endif() qt6_wrap_ui(offsetMeshingUI_FILES Offset_meshing_dialog.ui) cgal_lab_plugin(offset_meshing_plugin Offset_meshing_plugin ${offsetMeshingUI_FILES}) -target_link_libraries(offset_meshing_plugin PUBLIC scene_surface_mesh_item +target_link_libraries(offset_meshing_plugin PRIVATE scene_surface_mesh_item scene_polygon_soup_item scene_polylines_item) if(TARGET CGAL::Eigen3_support) diff --git a/Lab/demo/Lab/Plugins/Operations_on_polyhedra/CMakeLists.txt b/Lab/demo/Lab/Plugins/Operations_on_polyhedra/CMakeLists.txt index 3031fb3633e2..6ce91b90ed28 100644 --- a/Lab/demo/Lab/Plugins/Operations_on_polyhedra/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Operations_on_polyhedra/CMakeLists.txt @@ -3,34 +3,34 @@ qt6_wrap_ui(clip_polyhedronUI_FILES Clip_polyhedron_plugin.ui) cgal_lab_plugin(clip_polyhedron_plugin Clip_polyhedron_plugin ${clip_polyhedronUI_FILES}) target_link_libraries( - clip_polyhedron_plugin PUBLIC scene_surface_mesh_item scene_basic_objects + clip_polyhedron_plugin PRIVATE scene_surface_mesh_item scene_basic_objects scene_movable_sm_item) cgal_lab_plugin(point_set_from_vertices_plugin Point_set_from_vertices_plugin) target_link_libraries( point_set_from_vertices_plugin - PUBLIC scene_surface_mesh_item scene_polygon_soup_item + PRIVATE scene_surface_mesh_item scene_polygon_soup_item scene_points_with_normal_item) cgal_lab_plugin(point_set_from_sampling_plugin Point_set_from_sampling_plugin) target_link_libraries( point_set_from_sampling_plugin - PUBLIC scene_surface_mesh_item scene_polygon_soup_item + PRIVATE scene_surface_mesh_item scene_polygon_soup_item scene_points_with_normal_item) cgal_lab_plugin(diff_between_meshes_plugin Diff_between_meshes_plugin) -target_link_libraries(diff_between_meshes_plugin PUBLIC scene_surface_mesh_item) +target_link_libraries(diff_between_meshes_plugin PRIVATE scene_surface_mesh_item) qt6_wrap_ui( animateUI_FILES Animate_widget.ui ) cgal_lab_plugin(animate_mesh_plugin Animate_mesh_plugin ${animateUI_FILES}) - target_link_libraries(animate_mesh_plugin PUBLIC scene_surface_mesh_item) + target_link_libraries(animate_mesh_plugin PRIVATE scene_surface_mesh_item) if( TARGET CGAL::METIS_support ) qt6_wrap_ui( partitionUI_FILES PartitionDialog.ui ) cgal_lab_plugin(partition_plugin Partition_graph_plugin ${partitionUI_FILES}) - target_link_libraries(partition_plugin PUBLIC scene_surface_mesh_item CGAL::METIS_support ) + target_link_libraries(partition_plugin PRIVATE scene_surface_mesh_item CGAL::METIS_support ) else() message(STATUS "NOTICE: the Partition plugin needs METIS libraries and will not be compiled.") endif() diff --git a/Lab/demo/Lab/Plugins/PCA/CMakeLists.txt b/Lab/demo/Lab/Plugins/PCA/CMakeLists.txt index 1311f8a77a52..db919338b440 100644 --- a/Lab/demo/Lab/Plugins/PCA/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/PCA/CMakeLists.txt @@ -1,37 +1,37 @@ include(CGALlab_macros) cgal_lab_plugin(pca_plugin Pca_plugin KEYWORDS PointSetProcessing) target_link_libraries( - pca_plugin PUBLIC scene_surface_mesh_item scene_points_with_normal_item - scene_basic_objects) + pca_plugin PRIVATE scene_surface_mesh_item scene_points_with_normal_item + scene_basic_objects CGAL::Eigen3_support) qt6_wrap_ui(transformUI_FILES Transformation_widget.ui MeshOnGrid_dialog.ui) cgal_lab_plugin(affine_transform_plugin Affine_transform_plugin ${transformUI_FILES} KEYWORDS PointSetProcessing) -target_link_libraries(affine_transform_plugin PUBLIC scene_surface_mesh_item - scene_points_with_normal_item - scene_aff_transformed_item - scene_aff_transformed_point_set_item - scene_aff_transformed_polygon_soup_item - scene_aff_transformed_surface_mesh_item) +target_link_libraries(affine_transform_plugin PRIVATE scene_surface_mesh_item + scene_points_with_normal_item + scene_aff_transformed_item + scene_aff_transformed_point_set_item + scene_aff_transformed_polygon_soup_item + scene_aff_transformed_surface_mesh_item) cgal_lab_plugin(edit_box_plugin Edit_box_plugin) -target_link_libraries(edit_box_plugin PUBLIC scene_edit_box_item - scene_surface_mesh_item) +target_link_libraries(edit_box_plugin PRIVATE scene_edit_box_item + scene_surface_mesh_item) qt6_wrap_ui(clipUI_FILES Clipping_box_widget.ui) cgal_lab_plugin(clipping_box_plugin Clipping_box_plugin ${clipUI_FILES}) -target_link_libraries(clipping_box_plugin PUBLIC scene_edit_box_item - scene_basic_objects) +target_link_libraries(clipping_box_plugin PRIVATE scene_edit_box_item + scene_basic_objects) cgal_lab_plugin(create_bbox_mesh_plugin Create_bbox_mesh_plugin) -target_link_libraries(create_bbox_mesh_plugin PUBLIC scene_surface_mesh_item) +target_link_libraries(create_bbox_mesh_plugin PRIVATE scene_surface_mesh_item) cgal_lab_plugin(create_obb_mesh_plugin Create_obb_mesh_plugin) -target_link_libraries(create_obb_mesh_plugin PUBLIC scene_surface_mesh_item - scene_polygon_soup_item - scene_selection_item - scene_points_with_normal_item CGAL::Eigen3_support) +target_link_libraries(create_obb_mesh_plugin PRIVATE scene_surface_mesh_item + scene_polygon_soup_item + scene_selection_item + scene_points_with_normal_item CGAL::Eigen3_support) qt6_wrap_ui(volumesUI_FILES Basic_generator_widget.ui) cgal_lab_plugin( @@ -39,11 +39,11 @@ cgal_lab_plugin( PolygonMesh PointSetProcessing) target_link_libraries( basic_generator_plugin - PUBLIC scene_surface_mesh_item scene_points_with_normal_item - scene_polylines_item) - - if(CGAL_ENABLE_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) - set_tests_properties( - "compilation of create_obb_mesh_plugin" - PROPERTIES RESOURCE_LOCK Selection_test_resources) - endif() + PRIVATE scene_surface_mesh_item scene_points_with_normal_item + scene_polylines_item) + +if(CGAL_ENABLE_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) + set_tests_properties( + "compilation of create_obb_mesh_plugin" + PROPERTIES RESOURCE_LOCK Selection_test_resources) +endif() diff --git a/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt b/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt index 6d023a5b4ce5..dc5b8387f2ca 100644 --- a/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt @@ -3,7 +3,7 @@ include(CGALlab_macros) if(TARGET CGAL::Eigen3_support) cgal_lab_plugin(jet_fitting_plugin Jet_fitting_plugin) target_link_libraries( - jet_fitting_plugin PUBLIC scene_surface_mesh_item scene_polylines_item + jet_fitting_plugin PRIVATE scene_surface_mesh_item scene_polylines_item CGAL::Eigen3_support) else() message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Jet fitting plugin will not be available.") @@ -13,7 +13,7 @@ if(TARGET CGAL::Eigen3_support) cgal_lab_plugin(interpolated_corrected_principal_curvatures_plugin Interpolated_corrected_principal_curvatures_plugin) target_link_libraries( - interpolated_corrected_principal_curvatures_plugin PUBLIC scene_surface_mesh_item scene_polylines_item + interpolated_corrected_principal_curvatures_plugin PRIVATE scene_surface_mesh_item scene_polylines_item CGAL::Eigen3_support) else() @@ -24,23 +24,23 @@ else() endif() cgal_lab_plugin(extrude_plugin Extrude_plugin KEYWORDS PMP) -target_link_libraries(extrude_plugin PUBLIC scene_surface_mesh_item +target_link_libraries(extrude_plugin PRIVATE scene_surface_mesh_item scene_selection_item) if(TARGET CGAL::Eigen3_support) if("${EIGEN3_VERSION}" VERSION_GREATER "3.1.90") qt6_wrap_ui( hole_fillingUI_FILES Hole_filling_widget.ui) cgal_lab_plugin(hole_filling_plugin Hole_filling_plugin ${hole_fillingUI_FILES} KEYWORDS PMP) - target_link_libraries(hole_filling_plugin PUBLIC scene_surface_mesh_item scene_polylines_item scene_selection_item CGAL::Eigen3_support) + target_link_libraries(hole_filling_plugin PRIVATE scene_surface_mesh_item scene_polylines_item scene_selection_item CGAL::Eigen3_support) qt6_wrap_ui( fairingUI_FILES Fairing_widget.ui) cgal_lab_plugin(fairing_plugin Fairing_plugin ${fairingUI_FILES} KEYWORDS PMP) - target_link_libraries(fairing_plugin PUBLIC scene_selection_item CGAL::Eigen3_support) + target_link_libraries(fairing_plugin PRIVATE scene_selection_item CGAL::Eigen3_support) qt6_wrap_ui( Mean_curvature_flow_skeleton_pluginUI_FILES Mean_curvature_flow_skeleton_plugin.ui) cgal_lab_plugin(mean_curvature_flow_skeleton_plugin Mean_curvature_flow_skeleton_plugin ${Mean_curvature_flow_skeleton_pluginUI_FILES}) target_link_libraries(mean_curvature_flow_skeleton_plugin - PUBLIC + PRIVATE scene_surface_mesh_item scene_points_with_normal_item scene_polylines_item @@ -50,7 +50,7 @@ if(TARGET CGAL::Eigen3_support) # The smoothing plugin can still do some things, even if Ceres is not found qt6_wrap_ui( smoothingUI_FILES Smoothing_plugin.ui Smoothing_tangential_relaxation.ui) cgal_lab_plugin(smoothing_plugin Smoothing_plugin ${smoothingUI_FILES}) - target_link_libraries(smoothing_plugin PUBLIC scene_surface_mesh_item scene_selection_item CGAL::Eigen3_support) + target_link_libraries(smoothing_plugin PRIVATE scene_surface_mesh_item scene_selection_item CGAL::Eigen3_support) find_package(Ceres QUIET) include(CGAL_Ceres_support) if(TARGET CGAL::Ceres_support) @@ -66,7 +66,7 @@ if(TARGET CGAL::Eigen3_support) qt6_wrap_ui(remeshPlanarPatchesUI_FILES Remesh_planar_patches_dialog.ui) cgal_lab_plugin(remesh_planar_patches_plugin Remesh_planar_patches_plugin ${remeshPlanarPatchesUI_FILES} KEYWORDS PMP) - target_link_libraries(remesh_planar_patches_plugin PUBLIC scene_surface_mesh_item CGAL::Eigen3_support) + target_link_libraries(remesh_planar_patches_plugin PRIVATE scene_surface_mesh_item CGAL::Eigen3_support) if(CGAL_ENABLE_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) set_tests_properties( @@ -89,51 +89,51 @@ qt6_wrap_ui(soupUI_FILES Repair_soup.ui) cgal_lab_plugin(orient_soup_plugin Orient_soup_plugin ${soupUI_FILES} KEYWORDS Classification PMP) target_link_libraries( - orient_soup_plugin PUBLIC scene_polygon_soup_item scene_surface_mesh_item + orient_soup_plugin PRIVATE scene_polygon_soup_item scene_surface_mesh_item scene_polylines_item scene_points_with_normal_item) cgal_lab_plugin(inside_out_plugin Inside_out_plugin KEYWORDS PMP) -target_link_libraries(inside_out_plugin PUBLIC scene_surface_mesh_item scene_polygon_soup_item) +target_link_libraries(inside_out_plugin PRIVATE scene_surface_mesh_item scene_polygon_soup_item) cgal_lab_plugin(join_and_split_plugin Join_and_split_polyhedra_plugin KEYWORDS PMP) -target_link_libraries(join_and_split_plugin PUBLIC scene_surface_mesh_item scene_selection_item) +target_link_libraries(join_and_split_plugin PRIVATE scene_surface_mesh_item scene_selection_item) qt6_wrap_ui( point_inside_polyhedronUI_FILES Point_inside_polyhedron_widget.ui) cgal_lab_plugin(point_inside_polyhedron_plugin Point_inside_polyhedron_plugin ${point_inside_polyhedronUI_FILES}) -target_link_libraries(point_inside_polyhedron_plugin PUBLIC scene_surface_mesh_item scene_points_with_normal_item) +target_link_libraries(point_inside_polyhedron_plugin PRIVATE scene_surface_mesh_item scene_points_with_normal_item) qt6_wrap_ui( polyhedron_slicerUI_FILES Polyhedron_slicer_widget.ui) cgal_lab_plugin(polyhedron_slicer_plugin Polyhedron_slicer_plugin ${polyhedron_slicerUI_FILES}) -target_link_libraries(polyhedron_slicer_plugin PUBLIC scene_surface_mesh_item scene_basic_objects scene_polylines_item) +target_link_libraries(polyhedron_slicer_plugin PRIVATE scene_surface_mesh_item scene_basic_objects scene_polylines_item) cgal_lab_plugin(polyhedron_stitching_plugin Polyhedron_stitching_plugin KEYWORDS PMP) -target_link_libraries(polyhedron_stitching_plugin PUBLIC scene_surface_mesh_item scene_polylines_item) +target_link_libraries(polyhedron_stitching_plugin PRIVATE scene_surface_mesh_item scene_polylines_item) qt6_wrap_ui( selectionUI_FILES Selection_widget.ui) cgal_lab_plugin(selection_plugin Selection_plugin ${selectionUI_FILES} KEYWORDS PMP Viewer Classification Mesh_3) -target_link_libraries(selection_plugin PUBLIC scene_selection_item scene_points_with_normal_item scene_polylines_item) +target_link_libraries(selection_plugin PRIVATE scene_selection_item scene_points_with_normal_item scene_polylines_item) #to keep it simple to compile add_custom_target(self_intersection_plugin) add_dependencies(self_intersection_plugin selection_plugin) cgal_lab_plugin(triangulate_facets_plugin Triangulate_facets_plugin KEYWORDS PMP) -target_link_libraries(triangulate_facets_plugin PUBLIC scene_surface_mesh_item scene_selection_item scene_polygon_soup_item) +target_link_libraries(triangulate_facets_plugin PRIVATE scene_surface_mesh_item scene_selection_item scene_polygon_soup_item) cgal_lab_plugin(corefinement_plugin Corefinement_plugin KEYWORDS PMP) -target_link_libraries(corefinement_plugin PUBLIC scene_surface_mesh_item) +target_link_libraries(corefinement_plugin PRIVATE scene_surface_mesh_item) cgal_lab_plugin(surface_intersection_plugin Surface_intersection_plugin KEYWORDS PMP) target_link_libraries( surface_intersection_plugin - PUBLIC scene_surface_mesh_item scene_polylines_item + PRIVATE scene_surface_mesh_item scene_polylines_item scene_points_with_normal_item) qt6_wrap_ui( repairUI_FILES RemoveNeedlesDialog.ui SelfSnapDialog.ui AddBboxDialog.ui) cgal_lab_plugin(repair_polyhedron_plugin Repair_polyhedron_plugin ${repairUI_FILES} KEYWORDS PMP) -target_link_libraries(repair_polyhedron_plugin PUBLIC scene_points_with_normal_item scene_surface_mesh_item scene_polygon_soup_item) +target_link_libraries(repair_polyhedron_plugin PRIVATE scene_points_with_normal_item scene_surface_mesh_item scene_polygon_soup_item) if(TARGET CGAL::TBB_support) target_link_libraries(repair_polyhedron_plugin PRIVATE CGAL::TBB_support) endif() @@ -142,7 +142,7 @@ if(TARGET CGAL::Eigen3_support) qt6_wrap_ui(isotropicRemeshingUI_FILES Isotropic_remeshing_dialog.ui) cgal_lab_plugin(isotropic_remeshing_plugin Isotropic_remeshing_plugin ${isotropicRemeshingUI_FILES} KEYWORDS PMP) - target_link_libraries(isotropic_remeshing_plugin PUBLIC scene_surface_mesh_item + target_link_libraries(isotropic_remeshing_plugin PRIVATE scene_surface_mesh_item scene_selection_item CGAL::Eigen3_support) if(TARGET CGAL::TBB_support) @@ -154,31 +154,31 @@ else() endif() cgal_lab_plugin(distance_plugin Distance_plugin KEYWORDS PMP) -target_link_libraries(distance_plugin PUBLIC scene_surface_mesh_item +target_link_libraries(distance_plugin PRIVATE scene_surface_mesh_item scene_color_ramp) if(TARGET CGAL::TBB_support) target_link_libraries(distance_plugin PRIVATE CGAL::TBB_support) endif() cgal_lab_plugin(detect_sharp_edges_plugin Detect_sharp_edges_plugin KEYWORDS Viewer Mesh_3 PMP) -target_link_libraries(detect_sharp_edges_plugin PUBLIC scene_surface_mesh_item) +target_link_libraries(detect_sharp_edges_plugin PRIVATE scene_surface_mesh_item) qt6_wrap_ui(randomPerturbationUI_FILES Random_perturbation_dialog.ui) cgal_lab_plugin(random_perturbation_plugin Random_perturbation_plugin ${randomPerturbationUI_FILES} KEYWORDS PMP) -target_link_libraries(random_perturbation_plugin PUBLIC scene_surface_mesh_item +target_link_libraries(random_perturbation_plugin PRIVATE scene_surface_mesh_item scene_selection_item) cgal_lab_plugin(degenerated_faces_plugin Degenerated_faces_plugin KEYWORDS PMP) -target_link_libraries(degenerated_faces_plugin PUBLIC scene_surface_mesh_item +target_link_libraries(degenerated_faces_plugin PRIVATE scene_surface_mesh_item scene_selection_item) qt6_wrap_ui(engravUI_FILES Engrave_dock_widget.ui) cgal_lab_plugin(engrave_text_plugin Engrave_text_plugin ${engravUI_FILES}) target_link_libraries( - engrave_text_plugin PUBLIC scene_surface_mesh_item scene_selection_item + engrave_text_plugin PRIVATE scene_surface_mesh_item scene_selection_item scene_polylines_item CGAL::Eigen3_support) diff --git a/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt b/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt index b088ff9a0f38..6ea28f077af6 100644 --- a/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt @@ -37,8 +37,8 @@ if(TARGET CGAL::Eigen3_support) PointSetProcessing) target_link_libraries( surface_reconstruction_plugin - PUBLIC scene_polygon_soup_item scene_surface_mesh_item - scene_points_with_normal_item CGAL::Eigen3_support) + PRIVATE scene_polygon_soup_item scene_surface_mesh_item + scene_points_with_normal_item CGAL::Eigen3_support) if(TARGET CGAL::SCIP_support) target_link_libraries(surface_reconstruction_plugin PRIVATE CGAL::SCIP_support) @@ -54,31 +54,31 @@ if(TARGET CGAL::Eigen3_support) Classification) target_link_libraries( point_set_normal_estimation_plugin - PUBLIC scene_points_with_normal_item scene_callback_signaler - CGAL::Eigen3_support) + PRIVATE scene_points_with_normal_item scene_callback_signaler + CGAL::Eigen3_support) qt6_wrap_ui(features_detection_pluginUI_FILES Features_detection_plugin.ui) cgal_lab_plugin( features_detection_plugin Features_detection_plugin ${features_detection_pluginUI_FILES} KEYWORDS PointSetProcessing) target_link_libraries( - features_detection_plugin PUBLIC scene_points_with_normal_item - CGAL::Eigen3_support) + features_detection_plugin PRIVATE scene_points_with_normal_item + CGAL::Eigen3_support) cgal_lab_plugin(point_set_smoothing_plugin Point_set_smoothing_plugin KEYWORDS PointSetProcessing) target_link_libraries( point_set_smoothing_plugin - PUBLIC scene_points_with_normal_item scene_callback_signaler - CGAL::Eigen3_support) + PRIVATE scene_points_with_normal_item scene_callback_signaler + CGAL::Eigen3_support) cgal_lab_plugin( point_set_average_spacing_plugin Point_set_average_spacing_plugin KEYWORDS PointSetProcessing Classification) target_link_libraries( point_set_average_spacing_plugin - PUBLIC scene_points_with_normal_item scene_callback_signaler - CGAL::Eigen3_support) + PRIVATE scene_points_with_normal_item scene_callback_signaler + CGAL::Eigen3_support) qt6_wrap_ui(point_set_shape_detectionUI_FILES Point_set_shape_detection_plugin.ui) @@ -88,8 +88,8 @@ if(TARGET CGAL::Eigen3_support) Classification) target_link_libraries( point_set_shape_detection_plugin - PUBLIC scene_surface_mesh_item scene_points_with_normal_item - scene_polygon_soup_item scene_callback_signaler CGAL::Eigen3_support) + PRIVATE scene_surface_mesh_item scene_points_with_normal_item + scene_polygon_soup_item scene_callback_signaler CGAL::Eigen3_support) if (NOT MSVC_VERSION OR MSVC_VERSION GREATER_EQUAL 1910) find_package(OpenGR QUIET) include(CGAL_OpenGR_support) @@ -108,7 +108,7 @@ if(TARGET CGAL::Eigen3_support) register_point_sets_plugin Register_point_sets_plugin ${register_point_setsUI_FILES} KEYWORDS PointSetProcessing) target_link_libraries(register_point_sets_plugin - PUBLIC scene_points_with_normal_item) + PRIVATE scene_points_with_normal_item) target_link_libraries(register_point_sets_plugin PRIVATE CGAL::Eigen3_support) if(TARGET CGAL::OpenGR_support) target_link_libraries(register_point_sets_plugin @@ -135,67 +135,67 @@ cgal_lab_plugin( point_set_bilateral_smoothing_plugin Point_set_bilateral_smoothing_plugin ${point_set_bilateral_smoothingUI_FILES} KEYWORDS PointSetProcessing) target_link_libraries( - point_set_bilateral_smoothing_plugin PUBLIC scene_points_with_normal_item - scene_callback_signaler) + point_set_bilateral_smoothing_plugin PRIVATE scene_points_with_normal_item + scene_callback_signaler) qt6_wrap_ui(ps_outliers_removal_UI_FILES Point_set_outliers_removal_plugin.ui) cgal_lab_plugin( point_set_outliers_removal_plugin Point_set_outliers_removal_plugin ${ps_outliers_removal_UI_FILES} KEYWORDS PointSetProcessing) target_link_libraries( - point_set_outliers_removal_plugin PUBLIC scene_points_with_normal_item - scene_callback_signaler) + point_set_outliers_removal_plugin PRIVATE scene_points_with_normal_item + scene_callback_signaler) qt6_wrap_ui(point_set_selectionUI_FILES Point_set_selection_widget.ui) cgal_lab_plugin( point_set_selection_plugin Point_set_selection_plugin ${point_set_selectionUI_FILES} KEYWORDS PointSetProcessing Classification) target_link_libraries( - point_set_selection_plugin PUBLIC scene_points_with_normal_item - scene_polylines_item scene_edit_box_item) + point_set_selection_plugin PRIVATE scene_points_with_normal_item + scene_polylines_item scene_edit_box_item CGAL::Eigen3_support) qt6_wrap_ui(point_set_simplificationUI_FILES Point_set_simplification_plugin.ui) cgal_lab_plugin( point_set_simplification_plugin Point_set_simplification_plugin ${point_set_simplificationUI_FILES} KEYWORDS PointSetProcessing) target_link_libraries( - point_set_simplification_plugin PUBLIC scene_points_with_normal_item - scene_callback_signaler) + point_set_simplification_plugin PRIVATE scene_points_with_normal_item + scene_callback_signaler CGAL::Eigen3_support) qt6_wrap_ui(point_set_upsamplingUI_FILES Point_set_upsampling_plugin.ui) cgal_lab_plugin( point_set_upsampling_plugin Point_set_upsampling_plugin ${point_set_upsamplingUI_FILES} KEYWORDS PointSetProcessing) target_link_libraries(point_set_upsampling_plugin - PUBLIC scene_points_with_normal_item) + PRIVATE scene_points_with_normal_item) qt6_wrap_ui(point_set_wlopFILES Point_set_wlop_plugin.ui) cgal_lab_plugin(point_set_wlop_plugin Point_set_wlop_plugin ${point_set_wlopFILES} KEYWORDS PointSetProcessing) -target_link_libraries(point_set_wlop_plugin PUBLIC scene_points_with_normal_item - scene_callback_signaler) +target_link_libraries(point_set_wlop_plugin PRIVATE scene_points_with_normal_item + scene_callback_signaler) cgal_lab_plugin(point_set_clustering_plugin Point_set_clustering_plugin KEYWORDS PointSetProcessing) target_link_libraries( - point_set_clustering_plugin PUBLIC scene_points_with_normal_item - scene_callback_signaler CGAL::Eigen3_support) + point_set_clustering_plugin PRIVATE scene_points_with_normal_item + scene_callback_signaler CGAL::Eigen3_support) cgal_lab_plugin(merge_point_sets_plugin Merge_point_sets_plugin KEYWORDS PointSetProcessing Classification) target_link_libraries(merge_point_sets_plugin - PUBLIC scene_points_with_normal_item) + PRIVATE scene_points_with_normal_item) cgal_lab_plugin( point_set_interference_plugin Point_set_interference_plugin KEYWORDS PointSetProcessing) target_link_libraries(point_set_interference_plugin - PUBLIC scene_points_with_normal_item) + PRIVATE scene_points_with_normal_item) qt6_wrap_ui(alpha_shapeUI_FILES Alpha_shape_widget.ui) cgal_lab_plugin(alpha_shape_plugin Alpha_shape_plugin ${alpha_shapeUI_FILES} KEYWORDS PointSetProcessing) -target_link_libraries(alpha_shape_plugin PUBLIC scene_points_with_normal_item +target_link_libraries(alpha_shape_plugin PRIVATE scene_points_with_normal_item scene_c3t3_item) qt6_wrap_ui(distanceUI_FILES Point_set_to_mesh_distance_widget.ui) @@ -204,7 +204,7 @@ cgal_lab_plugin( ${distanceUI_FILES} KEYWORDS PointSetProcessing) target_link_libraries( point_set_to_mesh_distance_plugin - PUBLIC scene_points_with_normal_item scene_surface_mesh_item scene_color_ramp) + PRIVATE scene_points_with_normal_item scene_surface_mesh_item scene_color_ramp) if(TARGET CGAL::TBB_support) foreach( diff --git a/Lab/demo/Lab/Plugins/Subdivision_methods/CMakeLists.txt b/Lab/demo/Lab/Plugins/Subdivision_methods/CMakeLists.txt index 2e7afa092be1..c229e785147d 100644 --- a/Lab/demo/Lab/Plugins/Subdivision_methods/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Subdivision_methods/CMakeLists.txt @@ -1,4 +1,4 @@ include(CGALlab_macros) cgal_lab_plugin(subdivision_methods_plugin Subdivision_methods_plugin) -target_link_libraries(subdivision_methods_plugin PUBLIC scene_surface_mesh_item) +target_link_libraries(subdivision_methods_plugin PRIVATE scene_surface_mesh_item) diff --git a/Lab/demo/Lab/Plugins/Surface_mesh/CMakeLists.txt b/Lab/demo/Lab/Plugins/Surface_mesh/CMakeLists.txt index 2b8cabec2b6d..a08a9c5135c3 100644 --- a/Lab/demo/Lab/Plugins/Surface_mesh/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Surface_mesh/CMakeLists.txt @@ -11,7 +11,7 @@ if(NOT CGAL_DISABLE_GMP) cgal_lab_plugin(parameterization_plugin Parameterization_plugin ${parameterizationUI_FILES}) target_link_libraries( - parameterization_plugin PUBLIC scene_surface_mesh_item scene_textured_item + parameterization_plugin PRIVATE scene_surface_mesh_item scene_textured_item scene_selection_item CGAL::Eigen3_support) if(CGAL_ENABLE_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) @@ -27,7 +27,7 @@ if(NOT CGAL_DISABLE_GMP) qt6_wrap_ui(segmentationUI_FILES Mesh_segmentation_widget.ui) cgal_lab_plugin(mesh_segmentation_plugin Mesh_segmentation_plugin ${segmentationUI_FILES}) - target_link_libraries(mesh_segmentation_plugin PUBLIC scene_surface_mesh_item) + target_link_libraries(mesh_segmentation_plugin PRIVATE scene_surface_mesh_item) if(CGAL_ENABLE_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) set_tests_properties( @@ -37,13 +37,13 @@ if(NOT CGAL_DISABLE_GMP) qt6_wrap_ui( mesh_simplificationUI_FILES Mesh_simplification_dialog.ui) cgal_lab_plugin(mesh_simplification_plugin Mesh_simplification_plugin ${mesh_simplificationUI_FILES}) - target_link_libraries(mesh_simplification_plugin PUBLIC scene_surface_mesh_item scene_selection_item) + target_link_libraries(mesh_simplification_plugin PRIVATE scene_surface_mesh_item scene_selection_item) qt6_wrap_ui(shortestPathUI_FILES Shortest_path_widget.ui) cgal_lab_plugin(shortest_path_plugin Shortest_path_plugin ${shortestPathUI_FILES}) target_link_libraries( - shortest_path_plugin PUBLIC scene_surface_mesh_item scene_shortest_path_item + shortest_path_plugin PRIVATE scene_surface_mesh_item scene_shortest_path_item scene_basic_objects) qt6_wrap_ui(basicUI_FILES Surface_mesh_approximation_dockwidget.ui) @@ -52,7 +52,7 @@ if(NOT CGAL_DISABLE_GMP) ${basicUI_FILES} VSA_wrapper.cpp) target_link_libraries( surface_mesh_approximation_plugin - PUBLIC scene_surface_mesh_item scene_polygon_soup_item scene_polylines_item) + PRIVATE scene_surface_mesh_item scene_polygon_soup_item scene_polylines_item CGAL::Eigen3_support) else() message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.") endif() diff --git a/Lab/demo/Lab/Plugins/Surface_mesh_deformation/CMakeLists.txt b/Lab/demo/Lab/Plugins/Surface_mesh_deformation/CMakeLists.txt index 56a87f647fd7..e4cfaa821d42 100644 --- a/Lab/demo/Lab/Plugins/Surface_mesh_deformation/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Surface_mesh_deformation/CMakeLists.txt @@ -11,7 +11,7 @@ if(TARGET CGAL::Eigen3_support AND "${EIGEN3_VERSION}" VERSION_GREATER "3.1.90") scene_k_ring_selection scene_basic_objects) cgal_lab_plugin(edit_plugin Edit_polyhedron_plugin Deform_mesh.ui) - target_link_libraries(edit_plugin PUBLIC scene_surface_mesh_item + target_link_libraries(edit_plugin PRIVATE scene_surface_mesh_item scene_edit_item scene_selection_item) if(CGAL_ENABLE_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) diff --git a/Lab/demo/Lab/Plugins/Tetrahedral_remeshing/CMakeLists.txt b/Lab/demo/Lab/Plugins/Tetrahedral_remeshing/CMakeLists.txt index 1bd5a681ae3b..c79de635f857 100644 --- a/Lab/demo/Lab/Plugins/Tetrahedral_remeshing/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Tetrahedral_remeshing/CMakeLists.txt @@ -11,7 +11,7 @@ qt6_wrap_ui(tetRemeshingUI_FILES Tetrahedral_remeshing_dialog.ui) cgal_lab_plugin( tetrahedral_remeshing_plugin Tetrahedral_remeshing_plugin ${tetRemeshingUI_FILES} KEYWORDS Tetrahedral_remeshing) -target_link_libraries(tetrahedral_remeshing_plugin PUBLIC scene_c3t3_item +target_link_libraries(tetrahedral_remeshing_plugin PRIVATE scene_c3t3_item ${OPENGL_gl_LIBRARY}) find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) diff --git a/Lab/demo/Lab/Plugins/Three_examples/CMakeLists.txt b/Lab/demo/Lab/Plugins/Three_examples/CMakeLists.txt index a8548598c38b..71dab011d581 100644 --- a/Lab/demo/Lab/Plugins/Three_examples/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Three_examples/CMakeLists.txt @@ -28,5 +28,5 @@ if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) cgal_lab_plugin(basic_item_plugin Basic_item_plugin) # links the library containing the scene_plane_item with the plugin - target_link_libraries(basic_item_plugin PUBLIC scene_basic_objects) + target_link_libraries(basic_item_plugin PRIVATE scene_basic_objects) endif() diff --git a/Lab/demo/Lab/Scene_image_item.cpp b/Lab/demo/Lab/Scene_image_item.cpp index d68076d13029..25f58c09ce20 100644 --- a/Lab/demo/Lab/Scene_image_item.cpp +++ b/Lab/demo/Lab/Scene_image_item.cpp @@ -465,7 +465,6 @@ struct Scene_image_item_priv void draw_Bbox(Scene_item::Bbox bbox, std::vector *vertices); bool m_initialized; -//#ifdef SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE int m_voxel_scale; std::vector v_box; std::size_t idx_size, box_size; @@ -476,7 +475,6 @@ struct Scene_image_item_priv Image m_image_weights; float m_sigma_weights; -//#endif // SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE }; // ----------------------------------- // Scene_image_item From c0b59bd1179dcd8ec1d3971a5aac65a00cab3fcd Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 16 Oct 2024 17:34:26 +0200 Subject: [PATCH 19/29] second batch of modifications after review --- .../examples/Classification/CMakeLists.txt | 4 ++-- .../test/Classification/CMakeLists.txt | 4 ++-- Lab/demo/Lab/Plugins/AABB_tree/CMakeLists.txt | 2 +- .../Lab/Plugins/Classification/CMakeLists.txt | 2 +- .../Lab/Plugins/Convex_hull/CMakeLists.txt | 2 +- Lab/demo/Lab/Plugins/Mesh_2/CMakeLists.txt | 2 +- Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt | 21 +++++++++---------- .../Operations_on_polyhedra/CMakeLists.txt | 6 +++--- Lab/demo/Lab/Plugins/PMP/CMakeLists.txt | 16 +++++++------- .../Lab/Plugins/Surface_mesh/CMakeLists.txt | 4 ++-- .../Surface_mesh_deformation/CMakeLists.txt | 4 ++-- .../Tetrahedral_remeshing/CMakeLists.txt | 2 +- 12 files changed, 34 insertions(+), 35 deletions(-) diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index 61060474db98..803d4279ead2 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -69,8 +69,8 @@ foreach(target example_deprecated_conversion) if(TARGET ${target}) target_link_libraries(${target} PRIVATE CGAL::Eigen3_support - CGAL::Boost_iostreams_support - CGAL::Boost_serialization_support) + CGAL::Boost_iostreams_support + CGAL::Boost_serialization_support) if(TARGET CGAL::TBB_support) target_link_libraries(${target} PRIVATE CGAL::TBB_support) endif() diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index 8b3ccbf3da3c..332dc9216d88 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -42,8 +42,8 @@ create_single_source_cgal_program("test_classification_io.cpp") foreach(target test_classification_point_set test_classification_io) target_link_libraries(${target} PRIVATE CGAL::Eigen3_support - CGAL::Boost_iostreams_support - CGAL::Boost_serialization_support) + CGAL::Boost_iostreams_support + CGAL::Boost_serialization_support) if(TARGET CGAL::TBB_support) target_link_libraries(${target} PRIVATE CGAL::TBB_support) endif() diff --git a/Lab/demo/Lab/Plugins/AABB_tree/CMakeLists.txt b/Lab/demo/Lab/Plugins/AABB_tree/CMakeLists.txt index a4c713f5d1be..d23f2fa03354 100644 --- a/Lab/demo/Lab/Plugins/AABB_tree/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/AABB_tree/CMakeLists.txt @@ -6,7 +6,7 @@ target_link_libraries(do_trees_intersect_plugin PRIVATE scene_surface_mesh_item cgal_lab_plugin(cut_plugin Cut_plugin) target_link_libraries(cut_plugin PRIVATE scene_surface_mesh_item - scene_basic_objects scene_color_ramp) + scene_basic_objects scene_color_ramp) if(TARGET CGAL::TBB_support) target_link_libraries(cut_plugin PRIVATE CGAL::TBB_support) endif() diff --git a/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt b/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt index a2e4c681a0f7..ac08fbe8cd35 100644 --- a/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Classification/CMakeLists.txt @@ -49,7 +49,7 @@ if(TARGET CGAL::Eigen3_support) if(TARGET CGAL::Boost_serialization_support AND TARGET CGAL::Boost_iostreams_support) target_link_libraries(classification_plugin PRIVATE CGAL::Boost_serialization_support - CGAL::Boost_iostreams_support) + CGAL::Boost_iostreams_support) endif() if(TARGET CGAL::OpenCV_support) diff --git a/Lab/demo/Lab/Plugins/Convex_hull/CMakeLists.txt b/Lab/demo/Lab/Plugins/Convex_hull/CMakeLists.txt index 019615e46379..1bee65e4e6f8 100644 --- a/Lab/demo/Lab/Plugins/Convex_hull/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Convex_hull/CMakeLists.txt @@ -4,7 +4,7 @@ cgal_lab_plugin(convex_hull_plugin Convex_hull_plugin KEYWORDS PointSetProcessing) target_link_libraries( convex_hull_plugin PRIVATE scene_points_with_normal_item scene_polylines_item - scene_selection_item scene_surface_mesh_item) + scene_selection_item scene_surface_mesh_item) cgal_lab_plugin(kernel_plugin Kernel_plugin) target_link_libraries(kernel_plugin PRIVATE scene_surface_mesh_item) diff --git a/Lab/demo/Lab/Plugins/Mesh_2/CMakeLists.txt b/Lab/demo/Lab/Plugins/Mesh_2/CMakeLists.txt index c2e925d04ffd..c028613b1e30 100644 --- a/Lab/demo/Lab/Plugins/Mesh_2/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Mesh_2/CMakeLists.txt @@ -5,4 +5,4 @@ cgal_lab_plugin(mesh_2_plugin Mesh_2_plugin ${mesh_2UI_FILES}) #if the plugin uses external libraries like scene_items target_link_libraries( mesh_2_plugin PRIVATE scene_surface_mesh_item scene_polylines_item - scene_points_with_normal_item) + scene_points_with_normal_item) diff --git a/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt b/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt index 8ca5ad54d5d9..acf4b0dfdc84 100644 --- a/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt @@ -20,12 +20,12 @@ cgal_lab_plugin( target_link_libraries( mesh_3_plugin PRIVATE scene_polygon_soup_item - scene_polylines_item - scene_implicit_function_item - scene_image_item - scene_surface_mesh_item - scene_c3t3_item - ${OPENGL_gl_LIBRARY}) + scene_polylines_item + scene_implicit_function_item + scene_image_item + scene_surface_mesh_item + scene_c3t3_item + ${OPENGL_gl_LIBRARY}) target_include_directories(mesh_3_plugin PRIVATE include) find_package(ITK NAMES ITK InsightToolkit @@ -58,8 +58,7 @@ if(Boost_FILESYSTEM_FOUND) target_compile_definitions(io_image_plugin PRIVATE -DCGAL_USE_VTK -DNOMINMAX) endif() - target_link_libraries(io_image_plugin PRIVATE Boost::filesystem - Boost::system) + target_link_libraries(io_image_plugin PRIVATE Boost::filesystem Boost::system) else() message(STATUS "NOTICE: the Io_image_plugin requires boost-filesystem, and will not be compiled") @@ -75,7 +74,7 @@ cgal_lab_plugin( target_link_libraries( mesh_3_optimization_plugin PRIVATE scene_c3t3_item scene_surface_mesh_item scene_image_item - scene_implicit_function_item) + scene_implicit_function_item) # Use Eigen find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) @@ -110,8 +109,8 @@ qt6_wrap_ui(offsetMeshingUI_FILES Offset_meshing_dialog.ui) cgal_lab_plugin(offset_meshing_plugin Offset_meshing_plugin ${offsetMeshingUI_FILES}) target_link_libraries(offset_meshing_plugin PRIVATE scene_surface_mesh_item - scene_polygon_soup_item - scene_polylines_item) + scene_polygon_soup_item + scene_polylines_item) if(TARGET CGAL::Eigen3_support) target_link_libraries(offset_meshing_plugin PRIVATE CGAL::Eigen3_support) endif() diff --git a/Lab/demo/Lab/Plugins/Operations_on_polyhedra/CMakeLists.txt b/Lab/demo/Lab/Plugins/Operations_on_polyhedra/CMakeLists.txt index 6ce91b90ed28..8e60e5f29d96 100644 --- a/Lab/demo/Lab/Plugins/Operations_on_polyhedra/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Operations_on_polyhedra/CMakeLists.txt @@ -4,21 +4,21 @@ cgal_lab_plugin(clip_polyhedron_plugin Clip_polyhedron_plugin ${clip_polyhedronUI_FILES}) target_link_libraries( clip_polyhedron_plugin PRIVATE scene_surface_mesh_item scene_basic_objects - scene_movable_sm_item) + scene_movable_sm_item) cgal_lab_plugin(point_set_from_vertices_plugin Point_set_from_vertices_plugin) target_link_libraries( point_set_from_vertices_plugin PRIVATE scene_surface_mesh_item scene_polygon_soup_item - scene_points_with_normal_item) + scene_points_with_normal_item) cgal_lab_plugin(point_set_from_sampling_plugin Point_set_from_sampling_plugin) target_link_libraries( point_set_from_sampling_plugin PRIVATE scene_surface_mesh_item scene_polygon_soup_item - scene_points_with_normal_item) + scene_points_with_normal_item) cgal_lab_plugin(diff_between_meshes_plugin Diff_between_meshes_plugin) target_link_libraries(diff_between_meshes_plugin PRIVATE scene_surface_mesh_item) diff --git a/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt b/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt index dc5b8387f2ca..07e6e1b55c01 100644 --- a/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt @@ -4,7 +4,7 @@ if(TARGET CGAL::Eigen3_support) cgal_lab_plugin(jet_fitting_plugin Jet_fitting_plugin) target_link_libraries( jet_fitting_plugin PRIVATE scene_surface_mesh_item scene_polylines_item - CGAL::Eigen3_support) + CGAL::Eigen3_support) else() message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Jet fitting plugin will not be available.") endif() @@ -25,7 +25,7 @@ endif() cgal_lab_plugin(extrude_plugin Extrude_plugin KEYWORDS PMP) target_link_libraries(extrude_plugin PRIVATE scene_surface_mesh_item - scene_selection_item) + scene_selection_item) if(TARGET CGAL::Eigen3_support) if("${EIGEN3_VERSION}" VERSION_GREATER "3.1.90") @@ -66,7 +66,7 @@ if(TARGET CGAL::Eigen3_support) qt6_wrap_ui(remeshPlanarPatchesUI_FILES Remesh_planar_patches_dialog.ui) cgal_lab_plugin(remesh_planar_patches_plugin Remesh_planar_patches_plugin ${remeshPlanarPatchesUI_FILES} KEYWORDS PMP) - target_link_libraries(remesh_planar_patches_plugin PRIVATE scene_surface_mesh_item CGAL::Eigen3_support) + target_link_libraries(remesh_planar_patches_plugin PRIVATE scene_surface_mesh_item CGAL::Eigen3_support) if(CGAL_ENABLE_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) set_tests_properties( @@ -90,7 +90,7 @@ cgal_lab_plugin(orient_soup_plugin Orient_soup_plugin ${soupUI_FILES} KEYWORDS Classification PMP) target_link_libraries( orient_soup_plugin PRIVATE scene_polygon_soup_item scene_surface_mesh_item - scene_polylines_item scene_points_with_normal_item) + scene_polylines_item scene_points_with_normal_item) cgal_lab_plugin(inside_out_plugin Inside_out_plugin KEYWORDS PMP) @@ -167,20 +167,20 @@ qt6_wrap_ui(randomPerturbationUI_FILES Random_perturbation_dialog.ui) cgal_lab_plugin(random_perturbation_plugin Random_perturbation_plugin ${randomPerturbationUI_FILES} KEYWORDS PMP) target_link_libraries(random_perturbation_plugin PRIVATE scene_surface_mesh_item - scene_selection_item) + scene_selection_item) cgal_lab_plugin(degenerated_faces_plugin Degenerated_faces_plugin KEYWORDS PMP) target_link_libraries(degenerated_faces_plugin PRIVATE scene_surface_mesh_item - scene_selection_item) + scene_selection_item) qt6_wrap_ui(engravUI_FILES Engrave_dock_widget.ui) cgal_lab_plugin(engrave_text_plugin Engrave_text_plugin ${engravUI_FILES}) target_link_libraries( engrave_text_plugin PRIVATE scene_surface_mesh_item scene_selection_item - scene_polylines_item - CGAL::Eigen3_support) + scene_polylines_item + CGAL::Eigen3_support) if(CGAL_ENABLE_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) set_tests_properties( diff --git a/Lab/demo/Lab/Plugins/Surface_mesh/CMakeLists.txt b/Lab/demo/Lab/Plugins/Surface_mesh/CMakeLists.txt index a08a9c5135c3..dfa643eb52a4 100644 --- a/Lab/demo/Lab/Plugins/Surface_mesh/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Surface_mesh/CMakeLists.txt @@ -12,7 +12,7 @@ if(NOT CGAL_DISABLE_GMP) ${parameterizationUI_FILES}) target_link_libraries( parameterization_plugin PRIVATE scene_surface_mesh_item scene_textured_item - scene_selection_item CGAL::Eigen3_support) + scene_selection_item CGAL::Eigen3_support) if(CGAL_ENABLE_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) set_tests_properties( @@ -44,7 +44,7 @@ if(NOT CGAL_DISABLE_GMP) ${shortestPathUI_FILES}) target_link_libraries( shortest_path_plugin PRIVATE scene_surface_mesh_item scene_shortest_path_item - scene_basic_objects) + scene_basic_objects) qt6_wrap_ui(basicUI_FILES Surface_mesh_approximation_dockwidget.ui) cgal_lab_plugin( diff --git a/Lab/demo/Lab/Plugins/Surface_mesh_deformation/CMakeLists.txt b/Lab/demo/Lab/Plugins/Surface_mesh_deformation/CMakeLists.txt index e4cfaa821d42..e02fc0459292 100644 --- a/Lab/demo/Lab/Plugins/Surface_mesh_deformation/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Surface_mesh_deformation/CMakeLists.txt @@ -8,11 +8,11 @@ if(TARGET CGAL::Eigen3_support AND "${EIGEN3_VERSION}" VERSION_GREATER "3.1.90") ${editionUI_FILES}) target_link_libraries( scene_edit_item PRIVATE CGAL::Eigen3_support scene_surface_mesh_item - scene_k_ring_selection scene_basic_objects) + scene_k_ring_selection scene_basic_objects) cgal_lab_plugin(edit_plugin Edit_polyhedron_plugin Deform_mesh.ui) target_link_libraries(edit_plugin PRIVATE scene_surface_mesh_item - scene_edit_item scene_selection_item) + scene_edit_item scene_selection_item) if(CGAL_ENABLE_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND) set_tests_properties( diff --git a/Lab/demo/Lab/Plugins/Tetrahedral_remeshing/CMakeLists.txt b/Lab/demo/Lab/Plugins/Tetrahedral_remeshing/CMakeLists.txt index c79de635f857..db89b35b63c4 100644 --- a/Lab/demo/Lab/Plugins/Tetrahedral_remeshing/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Tetrahedral_remeshing/CMakeLists.txt @@ -12,7 +12,7 @@ cgal_lab_plugin( tetrahedral_remeshing_plugin Tetrahedral_remeshing_plugin ${tetRemeshingUI_FILES} KEYWORDS Tetrahedral_remeshing) target_link_libraries(tetrahedral_remeshing_plugin PRIVATE scene_c3t3_item - ${OPENGL_gl_LIBRARY}) + ${OPENGL_gl_LIBRARY}) find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) From d759e72d8d1008103c6f3a4cc03261abb0262159 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 17 Oct 2024 00:17:59 +0200 Subject: [PATCH 20/29] third batch of modifications --- .../cmake/modules/CGAL_SetupCGAL_Qt6Dependencies.cmake | 4 ++-- Installation/test/Installation/test_configuration.cmake.in | 2 +- .../test/Installation/test_configuration_qt.cmake.in | 2 +- Kernel_23/test/Kernel_23/CMakeLists.txt | 2 +- Three/doc/Three/Three.txt | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_Qt6Dependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_Qt6Dependencies.cmake index e8bc2f8c788e..fa87506ddcb4 100644 --- a/Installation/cmake/modules/CGAL_SetupCGAL_Qt6Dependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGAL_Qt6Dependencies.cmake @@ -76,9 +76,9 @@ if(NOT CGAL_Qt6_MISSING_DEPS) POSITION_INDEPENDENT_CODE TRUE EXCLUDE_FROM_ALL TRUE AUTOMOC TRUE) - target_link_libraries(CGAL_Qt6_moc_and_resources PUBLIC CGAL::CGAL Qt6::Widgets Qt6::OpenGLWidgets) + target_link_libraries(CGAL_Qt6_moc_and_resources PRIVATE CGAL::CGAL Qt6::Widgets Qt6::OpenGLWidgets) if(Qt6Svg_FOUND) - target_link_libraries(CGAL_Qt6_moc_and_resources PUBLIC Qt6::Svg) + target_link_libraries(CGAL_Qt6_moc_and_resources PRIVATE Qt6::Svg) endif() add_library(CGAL::CGAL_Qt6_moc_and_resources ALIAS CGAL_Qt6_moc_and_resources) add_library(CGAL::Qt6_moc_and_resources ALIAS CGAL_Qt6_moc_and_resources) diff --git a/Installation/test/Installation/test_configuration.cmake.in b/Installation/test/Installation/test_configuration.cmake.in index 4f4a08bc8dd6..fa820a795a5c 100644 --- a/Installation/test/Installation/test_configuration.cmake.in +++ b/Installation/test/Installation/test_configuration.cmake.in @@ -11,4 +11,4 @@ if(NOT ${CGAL_DIR_PATH} STREQUAL ${CGAL_GIVEN_DIR_PATH}) message( FATAL_ERROR "The CGAL_DIR is wrong !") endif() add_executable(test_configuration @CMAKE_CURRENT_SOURCE_DIR@/test_configuration.cpp) -target_link_libraries(test_configuration PUBLIC CGAL::CGAL) +target_link_libraries(test_configuration PRIVATE CGAL::CGAL) diff --git a/Installation/test/Installation/test_configuration_qt.cmake.in b/Installation/test/Installation/test_configuration_qt.cmake.in index 0001202e61c6..5dda5a91bc2f 100644 --- a/Installation/test/Installation/test_configuration_qt.cmake.in +++ b/Installation/test/Installation/test_configuration_qt.cmake.in @@ -11,4 +11,4 @@ if(NOT ${CGAL_DIR_PATH} STREQUAL ${CGAL_GIVEN_DIR_PATH}) message( FATAL_ERROR "The CGAL_DIR is wrong !") endif() add_executable(test_configuration @CMAKE_CURRENT_SOURCE_DIR@/test_configuration_qt.cpp) -target_link_libraries(test_configuration PUBLIC CGAL::CGAL CGAL::CGAL_Qt6) +target_link_libraries(test_configuration PRIVATE CGAL::CGAL CGAL::CGAL_Qt6) diff --git a/Kernel_23/test/Kernel_23/CMakeLists.txt b/Kernel_23/test/Kernel_23/CMakeLists.txt index 13ce4d27a38f..5ad54b946870 100644 --- a/Kernel_23/test/Kernel_23/CMakeLists.txt +++ b/Kernel_23/test/Kernel_23/CMakeLists.txt @@ -40,7 +40,7 @@ if(CGAL_KERNEL_23_TEST_RT_FT_PREDICATE_FLAGS) # add_compile_definitions(-DCGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_PREDICATES_WITH_TEMPLATED_OPERATORS) create_single_source_cgal_program("atomic_compilation_test.cpp") - target_precompile_headers(atomic_compilation_test PUBLIC [["atomic_RT_FT_predicate_headers.h"]]) + target_precompile_headers(atomic_compilation_test PRIVATE [["atomic_RT_FT_predicate_headers.h"]]) create_single_source_cgal_program("test_RT_or_FT_predicates.cpp") target_compile_definitions(test_RT_or_FT_predicates PRIVATE diff --git a/Three/doc/Three/Three.txt b/Three/doc/Three/Three.txt index 996cf95d13da..2156a47f8a97 100644 --- a/Three/doc/Three/Three.txt +++ b/Three/doc/Three/Three.txt @@ -199,7 +199,7 @@ Once your code is written, you will need to link the item's library to your plug cgal_lab_plugin(basic_item_plugin Basic_item_plugin) # links the library containing the scene_plane_item with the plugin - target_link_libraries(basic_item_plugin PUBLIC scene_basic_objects) + target_link_libraries(basic_item_plugin PRIVATE scene_basic_objects) \subsubsection exampleCreatingANewTypeItem Creating a new type of item @@ -252,7 +252,7 @@ After that, we can set the uniform values and actually draw the content of the c If you created your item in a specific file and you need to use it outside your plugin (like in another plugin), it is recommended to put it in the demo's root directory, and you will have to define your item in the general CGAL_Lab's CMakeLists.txt by using the macro add_item : add_item(scene_trivial_item Scene_trivial_item.cpp) - target_link_libraries(scene_trivial_item PUBLIC scene_dependances_item) + target_link_libraries(scene_trivial_item PRIVATE scene_dependances_item) \subsection exampleUsingAGroupItem Using a Scene_group_item @@ -353,7 +353,7 @@ Finally, you can declare your plugin If you need targets from the CGAL_Lab, you will have to add the prefix 'Lab_' to the target's name, as the exported targets belong to the namespace Lab_ cgal_lab_plugin(basic_item_plugin Basic_item_plugin) - target_link_libraries(basic_item_plugin PUBLIC Lab_scene_basic_objects) + target_link_libraries(basic_item_plugin PRIVATE Lab_scene_basic_objects) Notice that an external plugin will not be automatically loaded in the Lab. It must be built in its own project. From a0d79b755931d0c475ba505b91fff614f6711fc2 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 17 Oct 2024 00:49:27 +0200 Subject: [PATCH 21/29] fix the documentation --- .../Developer_manual/create_and_use_a_cmakelist.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt b/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt index f78ac8de15eb..dd6506eb4966 100644 --- a/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt +++ b/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt @@ -43,7 +43,7 @@ This section describes a minimal example of a program that uses \cgal and Qt6 fo \skip if(CGAL_Qt6_FOUND) -\until target_link_libraries(draw_surface_mesh PUBLIC CGAL::CGAL_Basic_viewer) +\until target_link_libraries(draw_surface_mesh PRIVATE CGAL::CGAL_Basic_viewer) \skip endif \until #end of the file From 439df7472bd70402a2301e949454d110baca7b93 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 17 Oct 2024 10:33:39 +0200 Subject: [PATCH 22/29] leftovers I had not pointed out I have reviewed all modifications. It should be the last batch. --- .../cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake | 2 +- Shape_detection/test/Shape_detection/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake index 816ae656fb43..94d2d839375a 100644 --- a/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake @@ -49,7 +49,7 @@ set_property(GLOBAL PROPERTY CGAL_Core_FOUND TRUE) function(CGAL_setup_CGAL_Core_dependencies target) find_package( Boost 1.72 REQUIRED ) - if (!CGAL_DISABLE_GMP AND GMP_FOUND) + if (NOT CGAL_DISABLE_GMP AND GMP_FOUND) use_CGAL_GMP_support(CGAL_Core INTERFACE) endif() target_compile_definitions(${target} INTERFACE CGAL_USE_CORE=1) diff --git a/Shape_detection/test/Shape_detection/CMakeLists.txt b/Shape_detection/test/Shape_detection/CMakeLists.txt index 503af515ccfa..85d23cf07d2b 100644 --- a/Shape_detection/test/Shape_detection/CMakeLists.txt +++ b/Shape_detection/test/Shape_detection/CMakeLists.txt @@ -51,7 +51,7 @@ if(TARGET CGAL::Eigen3_support) set(RANSAC_PROTO_DIR CACHE PATH "") add_executable(test_validity_sampled_data "test_validity_sampled_data.cpp") - target_link_libraries(test_validity_sampled_data CGAL::CGAL CGAL::Data CGAL::Eigen3_support) + target_link_libraries(test_validity_sampled_data PRIVATE CGAL::CGAL CGAL::Data CGAL::Eigen3_support) cgal_add_test(test_validity_sampled_data) else() message(STATUS "NOTICE: Some tests require Eigen 3.1 (or greater), and will not be compiled.") From 868e35140bb88eed1dca36a2fe420ce5cb5cd155 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 21 Oct 2024 16:18:10 +0200 Subject: [PATCH 23/29] fixes --- Lab/demo/Lab/CMakeLists.txt | 14 ++++++++++---- .../Plugins/Convex_decomposition/CMakeLists.txt | 3 ++- Lab/demo/Lab/Plugins/IO/CMakeLists.txt | 11 +++++++++-- Lab/demo/Lab/Plugins/PCA/CMakeLists.txt | 1 + Lab/demo/Lab/Plugins/PMP/CMakeLists.txt | 2 +- Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt | 3 ++- Lab/demo/Lab/Plugins/Surface_mesh/CMakeLists.txt | 9 ++++++--- 7 files changed, 31 insertions(+), 12 deletions(-) diff --git a/Lab/demo/Lab/CMakeLists.txt b/Lab/demo/Lab/CMakeLists.txt index f81c8c2a243d..644893829145 100644 --- a/Lab/demo/Lab/CMakeLists.txt +++ b/Lab/demo/Lab/CMakeLists.txt @@ -12,7 +12,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) #Defines flags to emulate windows behavior for linking error generation -if(CMAKE_CXX_COMPILER_ID EQUAL Clang +if(CMAKE_CXX_COMPILER_ID STREQUAL Clang OR CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) if(UNIX OR APPLE) @@ -244,7 +244,10 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) add_item(scene_c3t3_item Scene_c3t3_item.cpp) target_link_libraries( - scene_c3t3_item PRIVATE scene_triangulation_3_item + scene_c3t3_item + PUBLIC + scene_triangulation_3_item + PRIVATE scene_surface_mesh_item scene_polygon_soup_item scene_basic_objects ${TBB_LIBRARIES}) @@ -289,8 +292,11 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) target_link_libraries(scene_k_ring_selection PRIVATE scene_surface_mesh_item) add_item(scene_selection_item Scene_polyhedron_selection_item.cpp) - target_link_libraries(scene_selection_item PRIVATE scene_item_decorator - scene_k_ring_selection) + target_link_libraries(scene_selection_item + PUBLIC + scene_surface_mesh_item + scene_item_decorator + scene_k_ring_selection) if(TBB_FOUND) target_link_libraries(scene_selection_item PRIVATE CGAL::TBB_support) endif() diff --git a/Lab/demo/Lab/Plugins/Convex_decomposition/CMakeLists.txt b/Lab/demo/Lab/Plugins/Convex_decomposition/CMakeLists.txt index 683824fbeaa6..b17a2a80c140 100644 --- a/Lab/demo/Lab/Plugins/Convex_decomposition/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Convex_decomposition/CMakeLists.txt @@ -1,4 +1,5 @@ include(CGALlab_macros) cgal_lab_plugin(nef_plugin Nef_plugin) -target_link_libraries(nef_plugin PRIVATE scene_nef_polyhedron_item) +target_link_libraries(nef_plugin PRIVATE scene_nef_polyhedron_item scene_surface_mesh_item) + diff --git a/Lab/demo/Lab/Plugins/IO/CMakeLists.txt b/Lab/demo/Lab/Plugins/IO/CMakeLists.txt index 91bd7c6e2614..3938e505c923 100644 --- a/Lab/demo/Lab/Plugins/IO/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/IO/CMakeLists.txt @@ -59,8 +59,15 @@ target_link_libraries(triangulation_3_io_plugin PRIVATE scene_triangulation_3_it if(VTK_FOUND AND VTK_LIBRARIES) message(STATUS "VTK ${VTK_VERSION} found ${VTK_LIBRARIES}") cgal_lab_plugin(vtk_plugin VTK_io_plugin KEYWORDS Viewer Mesh_3) - target_link_libraries(vtk_plugin PRIVATE scene_surface_mesh_item scene_polylines_item scene_c3t3_item scene_points_with_normal_item - ${VTK_LIBRARIES}) + target_link_libraries(vtk_plugin + PRIVATE + scene_surface_mesh_item + scene_polygon_soup_item + scene_polylines_item + scene_c3t3_item + scene_points_with_normal_item + ${VTK_LIBRARIES} + ) target_compile_definitions(vtk_plugin PRIVATE -DCGAL_USE_VTK -DNOMINMAX) else() message(STATUS "NOTICE: the vtk IO plugin needs VTK 9.0 or greater and will not be compiled.") diff --git a/Lab/demo/Lab/Plugins/PCA/CMakeLists.txt b/Lab/demo/Lab/Plugins/PCA/CMakeLists.txt index db919338b440..afc4ad678d74 100644 --- a/Lab/demo/Lab/Plugins/PCA/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/PCA/CMakeLists.txt @@ -9,6 +9,7 @@ qt6_wrap_ui(transformUI_FILES Transformation_widget.ui MeshOnGrid_dialog.ui) cgal_lab_plugin(affine_transform_plugin Affine_transform_plugin ${transformUI_FILES} KEYWORDS PointSetProcessing) target_link_libraries(affine_transform_plugin PRIVATE scene_surface_mesh_item + scene_polygon_soup_item scene_points_with_normal_item scene_aff_transformed_item scene_aff_transformed_point_set_item diff --git a/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt b/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt index 07e6e1b55c01..f7efd5451286 100644 --- a/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/PMP/CMakeLists.txt @@ -112,7 +112,7 @@ target_link_libraries(polyhedron_stitching_plugin PRIVATE scene_surface_mesh_ite qt6_wrap_ui( selectionUI_FILES Selection_widget.ui) cgal_lab_plugin(selection_plugin Selection_plugin ${selectionUI_FILES} KEYWORDS PMP Viewer Classification Mesh_3) -target_link_libraries(selection_plugin PRIVATE scene_selection_item scene_points_with_normal_item scene_polylines_item) +target_link_libraries(selection_plugin PRIVATE scene_selection_item scene_surface_mesh_item scene_points_with_normal_item scene_polylines_item) #to keep it simple to compile add_custom_target(self_intersection_plugin) diff --git a/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt b/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt index e6ed10c00dc8..33f5adc3079b 100644 --- a/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt @@ -205,7 +205,8 @@ qt6_wrap_ui(alpha_shapeUI_FILES Alpha_shape_widget.ui) cgal_lab_plugin(alpha_shape_plugin Alpha_shape_plugin ${alpha_shapeUI_FILES} KEYWORDS PointSetProcessing) target_link_libraries(alpha_shape_plugin PRIVATE scene_points_with_normal_item - scene_c3t3_item) + scene_polygon_soup_item + scene_c3t3_item) qt6_wrap_ui(distanceUI_FILES Point_set_to_mesh_distance_widget.ui) cgal_lab_plugin( diff --git a/Lab/demo/Lab/Plugins/Surface_mesh/CMakeLists.txt b/Lab/demo/Lab/Plugins/Surface_mesh/CMakeLists.txt index dfa643eb52a4..fd5079bd00fd 100644 --- a/Lab/demo/Lab/Plugins/Surface_mesh/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Surface_mesh/CMakeLists.txt @@ -42,9 +42,12 @@ if(NOT CGAL_DISABLE_GMP) qt6_wrap_ui(shortestPathUI_FILES Shortest_path_widget.ui) cgal_lab_plugin(shortest_path_plugin Shortest_path_plugin ${shortestPathUI_FILES}) - target_link_libraries( - shortest_path_plugin PRIVATE scene_surface_mesh_item scene_shortest_path_item - scene_basic_objects) + target_link_libraries(shortest_path_plugin + PRIVATE + scene_surface_mesh_item + scene_selection_item + scene_shortest_path_item + scene_basic_objects) qt6_wrap_ui(basicUI_FILES Surface_mesh_approximation_dockwidget.ui) cgal_lab_plugin( From fb605cdd39e8b353cb40953fc05edc8cc89364b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 22 Oct 2024 08:18:34 +0200 Subject: [PATCH 24/29] remove -D that is not compatible with "older" cmake versions --- AABB_tree/demo/AABB_tree/CMakeLists.txt | 2 +- .../demo/Alpha_shapes_3/CMakeLists.txt | 2 +- .../Arrangement_on_surface_2/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../demo/Alpha_shapes_2/CMakeLists.txt | 2 +- .../demo/Apollonius_graph_2/CMakeLists.txt | 2 +- .../demo/Bounding_volumes/CMakeLists.txt | 2 +- .../demo/Circular_kernel_2/CMakeLists.txt | 2 +- GraphicsView/demo/Generator/CMakeLists.txt | 2 +- GraphicsView/demo/GraphicsView/CMakeLists.txt | 2 +- .../demo/L1_Voronoi_diagram_2/CMakeLists.txt | 2 +- .../demo/Largest_empty_rect_2/CMakeLists.txt | 2 +- .../Periodic_2_triangulation_2/CMakeLists.txt | 2 +- GraphicsView/demo/Polygon/CMakeLists.txt | 4 ++-- .../Segment_Delaunay_graph_2/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../demo/Snap_rounding_2/CMakeLists.txt | 2 +- .../demo/Spatial_searching_2/CMakeLists.txt | 2 +- .../demo/Stream_lines_2/CMakeLists.txt | 2 +- .../demo/Triangulation_2/CMakeLists.txt | 2 +- Kernel_23/test/Kernel_23/CMakeLists.txt | 2 +- Lab/demo/Lab/CMakeLists.txt | 8 ++++---- .../Linear_cell_complex_3/CMakeLists.txt | 2 +- .../demo/Linear_cell_complex/CMakeLists.txt | 20 +++++++++---------- .../Linear_cell_complex/CMakeLists.txt | 2 +- Mesh_3/benchmark/Mesh_3/CMakeLists.txt | 6 +++--- Mesh_3/examples/Mesh_3/CMakeLists.txt | 6 +++--- .../Periodic_3_triangulation_3/CMakeLists.txt | 2 +- .../Polyline_simplification_2/CMakeLists.txt | 2 +- Ridges_3/examples/Ridges_3/CMakeLists.txt | 2 +- .../Surface_mesh_topology/CMakeLists.txt | 4 ++-- .../Surface_mesh_topology/CMakeLists.txt | 8 ++++---- .../test/Surface_mesh_topology/CMakeLists.txt | 8 ++++---- .../Tetrahedral_remeshing/CMakeLists.txt | 2 +- .../test/Tetrahedral_remeshing/CMakeLists.txt | 4 ++-- .../demo/Triangulation_3/CMakeLists.txt | 4 ++-- 36 files changed, 62 insertions(+), 62 deletions(-) diff --git a/AABB_tree/demo/AABB_tree/CMakeLists.txt b/AABB_tree/demo/AABB_tree/CMakeLists.txt index 6a8551246fc6..eabac21335c7 100644 --- a/AABB_tree/demo/AABB_tree/CMakeLists.txt +++ b/AABB_tree/demo/AABB_tree/CMakeLists.txt @@ -14,7 +14,7 @@ find_package(Qt6 QUIET COMPONENTS Gui OpenGL) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) # Instruct CMake to run moc/ui/rcc automatically when needed. set(CMAKE_AUTOMOC ON) diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt index ffd128922f99..1028c6f4ea4d 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt @@ -13,7 +13,7 @@ find_package(Qt6 QUIET COMPONENTS Widgets OpenGL) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) # Instruct CMake to run moc/ui/rcc automatically when needed. set(CMAKE_AUTOMOC ON) diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt index f0546d39b6ba..990e8d5092e7 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt @@ -20,7 +20,7 @@ if (CGAL_Qt6_FOUND AND Qt6_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) # Arrangement package includes - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) option(COMPILE_UTILS_INCREMENTALLY "Compile files in Utils directory incrementally, or compile them all as a unit. \ Incremental compilation will be better for development and consume less \ diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/CMakeLists.txt b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/CMakeLists.txt index 47ac56dde951..fa18ff35df6f 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/CMakeLists.txt @@ -39,7 +39,7 @@ endif() -add_compile_definitions(-DQT_NO_VERSION_TAGGING) +add_compile_definitions(QT_NO_VERSION_TAGGING) # AOS file(GLOB source_files_aos Aos.h Aos.cpp Aos_defs.h diff --git a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt index da0637016798..d421e758dc29 100644 --- a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt +++ b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt @@ -9,7 +9,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt index 9be2cac7fed4..79a9c5843249 100644 --- a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt @@ -9,7 +9,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt index 3dc7150fa42a..7a1c55e23755 100644 --- a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt +++ b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt @@ -19,7 +19,7 @@ endif() if(CGAL_Qt6_FOUND AND Qt6_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) diff --git a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt index d5d492cfae83..3689b6a44951 100644 --- a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt +++ b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt @@ -9,7 +9,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/GraphicsView/demo/Generator/CMakeLists.txt b/GraphicsView/demo/Generator/CMakeLists.txt index 6d58ed411ccc..75ab3c6083e2 100644 --- a/GraphicsView/demo/Generator/CMakeLists.txt +++ b/GraphicsView/demo/Generator/CMakeLists.txt @@ -9,7 +9,7 @@ find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/GraphicsView/demo/GraphicsView/CMakeLists.txt b/GraphicsView/demo/GraphicsView/CMakeLists.txt index 2e96d21559a7..9568fd3efae4 100644 --- a/GraphicsView/demo/GraphicsView/CMakeLists.txt +++ b/GraphicsView/demo/GraphicsView/CMakeLists.txt @@ -9,7 +9,7 @@ find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) qt_add_executable(min min.cpp) diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt index 90b33fd63887..0a682e80fa8e 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt @@ -11,7 +11,7 @@ include_directories(BEFORE ./include) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt index 1a54859e917f..2dbae37b6978 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt +++ b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt @@ -10,7 +10,7 @@ find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt index 6b7f60e065bc..f630c8c6e80c 100644 --- a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt @@ -8,7 +8,7 @@ include_directories(BEFORE ./include) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) diff --git a/GraphicsView/demo/Polygon/CMakeLists.txt b/GraphicsView/demo/Polygon/CMakeLists.txt index e7f8e01c4449..85a964989c82 100644 --- a/GraphicsView/demo/Polygon/CMakeLists.txt +++ b/GraphicsView/demo/Polygon/CMakeLists.txt @@ -16,13 +16,13 @@ endif() find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) if(CGAL_Core_FOUND) - add_compile_definitions(-DCGAL_USE_CORE) + add_compile_definitions(CGAL_USE_CORE) endif() qt_add_executable(Polygon_2 Polygon_2.cpp diff --git a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt index 2839b7bc5bd8..7f805e60986a 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt @@ -15,7 +15,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) qt_add_executable( diff --git a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt index db839e832a7f..fc773d81ace8 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt @@ -13,7 +13,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) qt_add_executable( Segment_voronoi_linf_2 Segment_voronoi_linf_2.cpp diff --git a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt index f69d4103c8fb..9d3c41854bf3 100644 --- a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt +++ b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt @@ -12,7 +12,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) qt_add_executable( Snap_rounding_2 Snap_rounding_2.cpp diff --git a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt index d486a7f0bf9b..fd02ea6c1e92 100644 --- a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt +++ b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt @@ -10,7 +10,7 @@ find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt index 586e84746253..3c76339638af 100644 --- a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt +++ b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt @@ -10,7 +10,7 @@ find_package(Qt6 QUIET COMPONENTS Widgets) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/GraphicsView/demo/Triangulation_2/CMakeLists.txt b/GraphicsView/demo/Triangulation_2/CMakeLists.txt index 31cad71c9b20..141852b3ed5c 100644 --- a/GraphicsView/demo/Triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Triangulation_2/CMakeLists.txt @@ -17,7 +17,7 @@ if(NOT CGAL_Qt6_FOUND OR NOT Qt6_FOUND) return() endif() -add_compile_definitions(-DQT_NO_KEYWORDS) +add_compile_definitions(QT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) #-------------------------------- diff --git a/Kernel_23/test/Kernel_23/CMakeLists.txt b/Kernel_23/test/Kernel_23/CMakeLists.txt index 5ad54b946870..106eced3810c 100644 --- a/Kernel_23/test/Kernel_23/CMakeLists.txt +++ b/Kernel_23/test/Kernel_23/CMakeLists.txt @@ -37,7 +37,7 @@ if(CGAL_KERNEL_23_TEST_RT_FT_PREDICATE_FLAGS) # - create a lot of possible combinations, which is expensive to test # - create issues because some combinations might be RT-sufficient whereas others will require FT # - # add_compile_definitions(-DCGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_PREDICATES_WITH_TEMPLATED_OPERATORS) + # add_compile_definitions(CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_PREDICATES_WITH_TEMPLATED_OPERATORS) create_single_source_cgal_program("atomic_compilation_test.cpp") target_precompile_headers(atomic_compilation_test PRIVATE [["atomic_RT_FT_predicate_headers.h"]]) diff --git a/Lab/demo/Lab/CMakeLists.txt b/Lab/demo/Lab/CMakeLists.txt index 644893829145..81f8702e76c3 100644 --- a/Lab/demo/Lab/CMakeLists.txt +++ b/Lab/demo/Lab/CMakeLists.txt @@ -3,7 +3,7 @@ project(Lab_Demo) include(FeatureSummary) -add_compile_definitions ( -DCGAL_NO_DEPRECATED_CODE ) +add_compile_definitions(CGAL_NO_DEPRECATED_CODE) # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -48,7 +48,7 @@ set_package_properties( DESCRIPTION "To find this package, it should be sufficient to fill the Qt6_DIR variable with: ///lib/cmake/Qt6") if(Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) endif(Qt6_FOUND) find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) @@ -93,7 +93,7 @@ option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate parallelism in Mesh_3" OFF) # And add -DCGAL_CONCURRENT_MESH_3 if that option is ON if(CGAL_ACTIVATE_CONCURRENT_MESH_3 OR "$ENV{CGAL_ACTIVATE_CONCURRENT_MESH_3}") - add_compile_definitions(-DCGAL_CONCURRENT_MESH_3) + add_compile_definitions(CGAL_CONCURRENT_MESH_3) if(NOT TBB_FOUND) find_package(TBB REQUIRED) include(CGAL_TBB_support) @@ -350,7 +350,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) add_to_cached_list(CGAL_EXECUTABLE_TARGETS ${lib}) endforeach() - add_compile_definitions(-DUSE_FORWARD_DECL) + add_compile_definitions(USE_FORWARD_DECL) add_library( cgal_lab SHARED MainWindow.cpp diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt b/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt index 386bc33fafea..5166eee35aba 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt @@ -23,7 +23,7 @@ set(QT_USE_QTXML TRUE) include(${QT_USE_FILE}) add_compile_definitions(${QT_DEFINITIONS}) -add_compile_definitions(-DINCLUDE_TEMPLATES) +add_compile_definitions(INCLUDE_TEMPLATES) # Performance_3 add_executable(performance_3 performance_3.cpp) diff --git a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt index 1cba87aeb682..16b346a75641 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt @@ -9,25 +9,25 @@ project(Linear_cell_complex_Demo) set(CMAKE_INCLUDE_CURRENT_DIR ON) ## To add expensive tests -# add_compile_definitions("-DCGAL_CHECK_EXPENSIVE") -# add_compile_definitions("-Wall -Wextra") -# add_compile_definitions(-fsanitize=address) +# add_compile_definitions(CGAL_CHECK_EXPENSIVE) +# add_definitions("-Wall -Wextra") +# add_definitions(-fsanitize=address) # add_link_options(-fsanitize=address) -# add_compile_definitions("-D_GLIBCXX_DEBUG") +# add_compile_definitions(_GLIBCXX_DEBUG) ## For profilling with gprof # add_compile_definitions("-pg") # SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") ## To add an is_valid test after each operation (only in debug mode) -# add_compile_definitions("-DCGAL_CMAP_TEST_VALID_REMOVALS") -# add_compile_definitions("-DCGAL_CMAP_TEST_VALID_CONTRACTIONS") -# add_compile_definitions("-DCGAL_CMAP_TEST_VALID_INSERTIONS") +# add_compile_definitions(CGAL_CMAP_TEST_VALID_REMOVALS) +# add_compile_definitions(CGAL_CMAP_TEST_VALID_CONTRACTIONS) +# add_compile_definitions(CGAL_CMAP_TEST_VALID_INSERTIONS) # Option allowing to profile each operation of the demo (cout times on stdout). -add_compile_definitions(-DCGAL_PROFILE_LCC_DEMO) +add_compile_definitions(CGAL_PROFILE_LCC_DEMO) -add_compile_definitions(-DCMAP_WITH_INDEX) # to use cc with index (handle otherwise) +add_compile_definitions(CMAP_WITH_INDEX) # to use cc with index (handle otherwise) ################## find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) @@ -40,7 +40,7 @@ if(NOT CGAL_Qt6_FOUND OR NOT Qt6_FOUND) else() - add_compile_definitions(-DCGAL_USE_BASIC_VIEWER -DQT_NO_KEYWORDS) + add_compile_definitions(CGAL_USE_BASIC_VIEWER QT_NO_KEYWORDS) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) diff --git a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt index da2c0144a6e1..22760ad87b6f 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt @@ -11,7 +11,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) # set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") # To use valgrind, we must disable rounding math check. -# add_compile_definitions(-DCGAL_DISABLE_ROUNDING_MATH_CHECK) +# add_compile_definitions(CGAL_DISABLE_ROUNDING_MATH_CHECK) create_single_source_cgal_program("gmap_linear_cell_complex_3.cpp") create_single_source_cgal_program("linear_cell_complex_3.cpp") diff --git a/Mesh_3/benchmark/Mesh_3/CMakeLists.txt b/Mesh_3/benchmark/Mesh_3/CMakeLists.txt index dcb7518f288a..7e195ce1ff1f 100644 --- a/Mesh_3/benchmark/Mesh_3/CMakeLists.txt +++ b/Mesh_3/benchmark/Mesh_3/CMakeLists.txt @@ -6,13 +6,13 @@ project(Mesh_3_benchmark) find_package(CGAL REQUIRED COMPONENTS ImageIO) -add_compile_definitions(-DCGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX +add_compile_definitions(CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX -DCGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS) # Activate verbose mode? (turned OFF by default) option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate verbose mode in Mesh_3" OFF) if(MESH_3_VERBOSE) - add_compile_definitions(-DCGAL_MESH_3_VERBOSE) + add_compile_definitions(CGAL_MESH_3_VERBOSE) endif() # Activate concurrency? (turned OFF by default) @@ -20,7 +20,7 @@ option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate parallelism in Mesh_3" OFF) # And add -DCGAL_CONCURRENT_MESH_3 if that option is ON if(CGAL_ACTIVATE_CONCURRENT_MESH_3) - add_compile_definitions(-DCGAL_CONCURRENT_MESH_3) + add_compile_definitions(CGAL_CONCURRENT_MESH_3) find_package(TBB REQUIRED) include(CGAL_TBB_support) else() diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index 5ed6a9b95700..e16b0fca3388 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -1,11 +1,11 @@ cmake_minimum_required(VERSION 3.12...3.29) project(Mesh_3_Examples) -add_compile_definitions(-DCGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX +add_compile_definitions(CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX -DCGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS) if(CGAL_MESH_3_VERBOSE) - add_compile_definitions(-DCGAL_MESH_3_VERBOSE) + add_compile_definitions(CGAL_MESH_3_VERBOSE) endif() find_package(CGAL REQUIRED COMPONENTS ImageIO) @@ -13,7 +13,7 @@ find_package(CGAL REQUIRED COMPONENTS ImageIO) option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate parallelism in Mesh_3" OFF) if(CGAL_ACTIVATE_CONCURRENT_MESH_3 OR "$ENV{CGAL_ACTIVATE_CONCURRENT_MESH_3}") - add_compile_definitions(-DCGAL_CONCURRENT_MESH_3) + add_compile_definitions(CGAL_CONCURRENT_MESH_3) find_package(TBB REQUIRED) include(CGAL_TBB_support) endif() diff --git a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt index 30bc4d0c97f9..c4c128de19ba 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt +++ b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt @@ -11,7 +11,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) find_package(Qt6 QUIET COMPONENTS Widgets OpenGL Help ToolsTools) if(Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) endif(Qt6_FOUND) diff --git a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt index 69e4a9748459..97f1671d671d 100644 --- a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt +++ b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt @@ -12,7 +12,7 @@ find_package(Qt6 QUIET COMPONENTS Widgets) include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include) if(CGAL_Qt6_FOUND AND Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index 22e25c7fd961..6eab0514fad7 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -18,7 +18,7 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program(Ridges_Umbilics_LCC.cpp) target_link_libraries(Ridges_Umbilics_LCC PRIVATE CGAL::Eigen3_support) - add_compile_definitions("-DCGAL_USE_BOOST_PROGRAM_OPTIONS") + add_compile_definitions(CGAL_USE_BOOST_PROGRAM_OPTIONS) target_link_libraries(Compute_Ridges_Umbilics PRIVATE Boost::program_options) target_link_libraries(Ridges_Umbilics_SM PRIVATE Boost::program_options) target_link_libraries(Ridges_Umbilics_LCC PRIVATE Boost::program_options) diff --git a/Surface_mesh_topology/benchmark/Surface_mesh_topology/CMakeLists.txt b/Surface_mesh_topology/benchmark/Surface_mesh_topology/CMakeLists.txt index 0459f5ea2490..ed4937594fc6 100644 --- a/Surface_mesh_topology/benchmark/Surface_mesh_topology/CMakeLists.txt +++ b/Surface_mesh_topology/benchmark/Surface_mesh_topology/CMakeLists.txt @@ -4,8 +4,8 @@ cmake_minimum_required(VERSION 3.12...3.29) find_package(CGAL REQUIRED) -# add_compile_definitions(-DCGAL_TRACE_PATH_TESTS) -# add_compile_definitions(-DCGAL_TRACE_CMAP_TOOLS) +# add_compile_definitions(CGAL_TRACE_PATH_TESTS) +# add_compile_definitions(CGAL_TRACE_CMAP_TOOLS) set(SOURCE_FILES quadrangulation_computation_benchmarks.cpp path_homotopy_with_schema.cpp) diff --git a/Surface_mesh_topology/examples/Surface_mesh_topology/CMakeLists.txt b/Surface_mesh_topology/examples/Surface_mesh_topology/CMakeLists.txt index d18f19190b82..ae6793d8270c 100644 --- a/Surface_mesh_topology/examples/Surface_mesh_topology/CMakeLists.txt +++ b/Surface_mesh_topology/examples/Surface_mesh_topology/CMakeLists.txt @@ -3,10 +3,10 @@ project(Surface_mesh_topology_Examples) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) -# add_compile_definitions(-DCGAL_TRACE_PATH_TESTS) -# add_compile_definitions(-DCGAL_TRACE_CMAP_TOOLS) -# add_compile_definitions("-Wall -Wextra") -# add_compile_definitions("-D_GLIBCXX_DEBUG") +# add_compile_definitions(CGAL_TRACE_PATH_TESTS) +# add_compile_definitions(CGAL_TRACE_CMAP_TOOLS) +# add_definitions("-Wall -Wextra") +# add_compile_definitions(_GLIBCXX_DEBUG) set(SOURCE_FILES edgewidth_lcc.cpp diff --git a/Surface_mesh_topology/test/Surface_mesh_topology/CMakeLists.txt b/Surface_mesh_topology/test/Surface_mesh_topology/CMakeLists.txt index 7924745df87d..dc45d083c3e4 100644 --- a/Surface_mesh_topology/test/Surface_mesh_topology/CMakeLists.txt +++ b/Surface_mesh_topology/test/Surface_mesh_topology/CMakeLists.txt @@ -3,10 +3,10 @@ project(Surface_mesh_topology_Tests) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) -# add_compile_definitions(-DCGAL_TRACE_PATH_TESTS) -# add_compile_definitions(-DCGAL_TRACE_CMAP_TOOLS) -# add_compile_definitions("-Wall -Wextra") -# add_compile_definitions("-D_GLIBCXX_DEBUG") +# add_compile_definitions(CGAL_TRACE_PATH_TESTS) +# add_compile_definitions(CGAL_TRACE_CMAP_TOOLS) +# add_definitions("-Wall -Wextra") +# add_compile_definitions(_GLIBCXX_DEBUG) set(SOURCE_FILES fundamental_group_of_the_circle.cpp diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt index cd7a9f7e7370..64bbdc1a1940 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt @@ -16,7 +16,7 @@ create_single_source_cgal_program("tetrahedral_remeshing_from_mesh.cpp") # Concurrent Mesh_3 option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate parallelism in Mesh_3" OFF) if(CGAL_ACTIVATE_CONCURRENT_MESH_3 OR "$ENV{CGAL_ACTIVATE_CONCURRENT_MESH_3}") - add_compile_definitions(-DCGAL_CONCURRENT_MESH_3) + add_compile_definitions(CGAL_CONCURRENT_MESH_3) find_package(TBB REQUIRED) include(CGAL_TBB_support) else() diff --git a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt index 07dfc6ea0f41..de0fb965c4ef 100644 --- a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt @@ -8,8 +8,8 @@ project(Tetrahedral_remeshing_Tests) # CGAL and its components find_package(CGAL REQUIRED COMPONENTS ImageIO) -add_compile_definitions(-DCGAL_TETRAHEDRAL_REMESHING_VERBOSE) -#add_compile_definitions(-DCGAL_CHECK_EXPENSIVE) #to activate expensive assertions +add_compile_definitions(CGAL_TETRAHEDRAL_REMESHING_VERBOSE) +#add_compile_definitions(CGAL_CHECK_EXPENSIVE) #to activate expensive assertions create_single_source_cgal_program("test_tetrahedral_remeshing.cpp") create_single_source_cgal_program("test_tetrahedral_remeshing_with_features.cpp") diff --git a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt index b4dfe997b885..df83176883da 100644 --- a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt @@ -12,7 +12,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6) find_package(Qt6 QUIET COMPONENTS Widgets OpenGL) if(Qt6_FOUND) - add_compile_definitions(-DQT_NO_KEYWORDS) + add_compile_definitions(QT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) endif(Qt6_FOUND) @@ -22,7 +22,7 @@ option(CGAL_ACTIVATE_CONCURRENT_TRIANGULATION_3 # And add -DCGAL_CONCURRENT_TRIANGULATION_3 if that option is ON if(CGAL_ACTIVATE_CONCURRENT_TRIANGULATION_3) - add_compile_definitions(-DCGAL_CONCURRENT_TRIANGULATION_3) + add_compile_definitions(CGAL_CONCURRENT_TRIANGULATION_3) find_package(TBB REQUIRED) include(CGAL_TBB_support) else(CGAL_ACTIVATE_CONCURRENT_TRIANGULATION_3) From f63429f644dbafe23ae9a365854db68db5c37cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 23 Oct 2024 09:02:16 +0200 Subject: [PATCH 25/29] check UmfPack is available --- .../examples/Surface_mesh_parameterization/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt index 38b0f74f05fc..d7f18ecee2be 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt @@ -31,10 +31,10 @@ if(TARGET CGAL::Eigen3_support) message(STATUS "SuiteSparse_LIBS: ${SuiteSparse_LIBRARIES}") message(STATUS "Orbifold Tutte Embeddings will use UmfPackLU") else() - message(STATUS "NOTICE: The example `orbifold.cpp` will be compiled without the SuiteSparse library and UmfPack. Try setting SuiteSparse_UMF_INCLUDE_DIR and at least one of SuiteSparse_UMFPACK_LIBRARY_RELEASE and SuiteSparse_UMFPACK_LIBRARY_DEBUG to you UMFPACK installation.") + message(STATUS "NOTICE: Examples will be compiled without the SuiteSparse library and UmfPack. Try setting SuiteSparse_UMF_INCLUDE_DIR and at least one of SuiteSparse_UMFPACK_LIBRARY_RELEASE and SuiteSparse_UMFPACK_LIBRARY_DEBUG to you UMFPACK installation.") endif() else(SuiteSparse_FOUND) - message(STATUS "NOTICE: The example `orbifold.cpp` will not be compiled without the SuiteSparse library.") + message(STATUS "NOTICE: Examples will not be compiled without the SuiteSparse library.") endif(SuiteSparse_FOUND) # ------------------------------------------------------------------ @@ -57,11 +57,13 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(square_border_parameterizer PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program( "iterative_authalic_parameterizer.cpp" ) target_link_libraries(iterative_authalic_parameterizer PRIVATE CGAL::Eigen3_support) - if(SuiteSparse_FOUND) + if(SuiteSparse_UMFPACK_FOUND OR TARGET SuiteSparse::umfpack) target_compile_definitions(ARAP_parameterization PRIVATE -DEIGEN_DONT_ALIGN_STATICALLY -DCGAL_SMP_USE_SUITESPARSE_SOLVERS ) target_compile_definitions(orbifold PRIVATE -DEIGEN_DONT_ALIGN_STATICALLY -DCGAL_SMP_USE_SUITESPARSE_SOLVERS ) + target_compile_definitions(iterative_authalic_parameterizer PRIVATE -DEIGEN_DONT_ALIGN_STATICALLY -DCGAL_SMP_USE_SUITESPARSE_SOLVERS ) target_link_libraries(ARAP_parameterization PRIVATE ${SuiteSparse_LIBRARIES}) target_link_libraries(orbifold PRIVATE ${SuiteSparse_LIBRARIES}) + target_link_libraries(iterative_authalic_parameterizer PRIVATE ${SuiteSparse_LIBRARIES}) endif() else() From 071144bd763b41c7ecb0c493950d9ed043b2a91f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 23 Oct 2024 09:10:30 +0200 Subject: [PATCH 26/29] fix linking --- .../Surface_mesh_parameterization/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt index d7f18ecee2be..5d74cdca6618 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt @@ -57,13 +57,13 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(square_border_parameterizer PRIVATE CGAL::Eigen3_support) create_single_source_cgal_program( "iterative_authalic_parameterizer.cpp" ) target_link_libraries(iterative_authalic_parameterizer PRIVATE CGAL::Eigen3_support) - if(SuiteSparse_UMFPACK_FOUND OR TARGET SuiteSparse::umfpack) - target_compile_definitions(ARAP_parameterization PRIVATE -DEIGEN_DONT_ALIGN_STATICALLY -DCGAL_SMP_USE_SUITESPARSE_SOLVERS ) - target_compile_definitions(orbifold PRIVATE -DEIGEN_DONT_ALIGN_STATICALLY -DCGAL_SMP_USE_SUITESPARSE_SOLVERS ) - target_compile_definitions(iterative_authalic_parameterizer PRIVATE -DEIGEN_DONT_ALIGN_STATICALLY -DCGAL_SMP_USE_SUITESPARSE_SOLVERS ) + if(SuiteSparse_FOUND) target_link_libraries(ARAP_parameterization PRIVATE ${SuiteSparse_LIBRARIES}) target_link_libraries(orbifold PRIVATE ${SuiteSparse_LIBRARIES}) - target_link_libraries(iterative_authalic_parameterizer PRIVATE ${SuiteSparse_LIBRARIES}) + if(SuiteSparse_UMFPACK_FOUND OR TARGET SuiteSparse::umfpack) + target_compile_definitions(ARAP_parameterization PRIVATE EIGEN_DONT_ALIGN_STATICALLY CGAL_SMP_USE_SUITESPARSE_SOLVERS ) + target_compile_definitions(orbifold PRIVATE EIGEN_DONT_ALIGN_STATICALLY CGAL_SMP_USE_SUITESPARSE_SOLVERS ) + endif() endif() else() From 88381be445feb11702ae1b2c511c26e7b78aa886 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 23 Oct 2024 09:55:29 +0200 Subject: [PATCH 27/29] fix compilation error --- Lab/demo/Lab/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lab/demo/Lab/CMakeLists.txt b/Lab/demo/Lab/CMakeLists.txt index 81f8702e76c3..ee7d815cd030 100644 --- a/Lab/demo/Lab/CMakeLists.txt +++ b/Lab/demo/Lab/CMakeLists.txt @@ -366,7 +366,7 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) ${SubViewerUI_files}) target_link_libraries( cgal_lab PRIVATE demo_framework point_dialog Qt6::Widgets - PUBLIC Qt6::Gui Qt6::OpenGLWidgets Qt6::Qml + PUBLIC CGAL::CGAL Qt6::Gui Qt6::OpenGLWidgets Qt6::Qml ) if(LIBSSH_FOUND) target_compile_definitions(cgal_lab PRIVATE -DCGAL_USE_SSH) From aef524f09ffc053d6b951abe98ada5558f09a21a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 23 Oct 2024 11:44:27 +0200 Subject: [PATCH 28/29] remove extra -D --- Mesh_3/examples/Mesh_3/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index e16b0fca3388..18924a5dfeb4 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.12...3.29) project(Mesh_3_Examples) add_compile_definitions(CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX - -DCGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS) + CGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS) if(CGAL_MESH_3_VERBOSE) add_compile_definitions(CGAL_MESH_3_VERBOSE) From 77bfe7d46fecdfcccc8b9e4224e41485aad65662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 24 Oct 2024 14:49:18 +0200 Subject: [PATCH 29/29] add missing link to TBB --- Lab/demo/Lab/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Lab/demo/Lab/CMakeLists.txt b/Lab/demo/Lab/CMakeLists.txt index ee7d815cd030..885cd774ce1c 100644 --- a/Lab/demo/Lab/CMakeLists.txt +++ b/Lab/demo/Lab/CMakeLists.txt @@ -251,16 +251,20 @@ if(CGAL_Qt6_FOUND AND Qt6_FOUND) scene_surface_mesh_item scene_polygon_soup_item scene_basic_objects ${TBB_LIBRARIES}) + add_item(scene_tetrahedra_item Scene_tetrahedra_item.cpp) + target_link_libraries(scene_tetrahedra_item PRIVATE scene_c3t3_item) + + if(TARGET CGAL::TBB_support) target_link_libraries(scene_c3t3_item PRIVATE CGAL::TBB_support) target_link_libraries(scene_triangulation_3_item PRIVATE CGAL::TBB_support) + target_link_libraries(scene_tetrahedra_item PRIVATE CGAL::TBB_support) endif() + if(COMMAND target_precompile_headers) # Support for precompiled headers, for Mesh_3 (since CMake 3.16) target_precompile_headers(scene_c3t3_item PUBLIC [["C3t3_type.h"]]) endif() - add_item(scene_tetrahedra_item Scene_tetrahedra_item.cpp) - target_link_libraries(scene_tetrahedra_item PRIVATE scene_c3t3_item) add_item(scene_aff_transformed_item Plugins/PCA/Scene_aff_transformed_item.cpp)