diff --git a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt index 02f1ac1c563..a680de07a5a 100644 --- a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt @@ -9,7 +9,7 @@ if ( CGAL_FOUND ) find_package(MPFI QUIET) endif() -if( CGAL_FOUND AND MPFI_FOUND) +if( CGAL_FOUND AND CGAL_Core_FOUND AND MPFI_FOUND) include( ${CGAL_USE_FILE} ) include( ${MPFI_USE_FILE} ) @@ -23,6 +23,6 @@ if( CGAL_FOUND AND MPFI_FOUND) else() - message(STATUS "This program requires the CGAL library and MPFI, and will not be compiled.") + message(STATUS "This program requires the CGAL, CGAL_Core and MPFI libraries, and will not be compiled.") endif() diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt index 73b7294442b..f789001b5f0 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt @@ -42,26 +42,30 @@ include( ${CGAL_USE_FILE} ) # ########################################################## create_single_source_cgal_program( "cyclic.cpp" ) -create_single_source_cgal_program( "Algebraic_curve_kernel_2.cpp" ) -create_single_source_cgal_program( "algebraic_curve_kernel_2_tools.cpp" ) -create_single_source_cgal_program( "Algebraic_kernel_d_1_LEDA.cpp" ) - -create_single_source_cgal_program( "Algebraic_kernel_d_1_CORE_Integer_rational.cpp" ) -create_single_source_cgal_program( "Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp" ) -create_single_source_cgal_program( "Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp" ) -create_single_source_cgal_program( "Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp" ) - -create_single_source_cgal_program( "Algebraic_kernel_d_1_GMP.cpp" ) -create_single_source_cgal_program( "Algebraic_kernel_d_2.cpp" ) -create_single_source_cgal_program( "Algebraic_real_d_1.cpp" ) -create_single_source_cgal_program( "Bitstream_descartes.cpp" ) -create_single_source_cgal_program( "Curve_analysis_2.cpp" ) -create_single_source_cgal_program( "Curve_pair_analysis_2.cpp" ) create_single_source_cgal_program( "Descartes.cpp" ) -create_single_source_cgal_program( "Real_embeddable_traits_extension.cpp" ) -if(RS_FOUND) - create_single_source_cgal_program( "Algebraic_kernel_rs_gmpq_d_1.cpp" ) - create_single_source_cgal_program( "Algebraic_kernel_rs_gmpz_d_1.cpp" ) +if(CGAL_Core_FOUND) + create_single_source_cgal_program( "Algebraic_curve_kernel_2.cpp" ) + create_single_source_cgal_program( "algebraic_curve_kernel_2_tools.cpp" ) + create_single_source_cgal_program( "Algebraic_kernel_d_1_LEDA.cpp" ) + + create_single_source_cgal_program( "Algebraic_kernel_d_1_CORE_Integer_rational.cpp" ) + create_single_source_cgal_program( "Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp" ) + create_single_source_cgal_program( "Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp" ) + create_single_source_cgal_program( "Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp" ) + + create_single_source_cgal_program( "Algebraic_kernel_d_1_GMP.cpp" ) + create_single_source_cgal_program( "Algebraic_kernel_d_2.cpp" ) + create_single_source_cgal_program( "Algebraic_real_d_1.cpp" ) + create_single_source_cgal_program( "Bitstream_descartes.cpp" ) + create_single_source_cgal_program( "Curve_analysis_2.cpp" ) + create_single_source_cgal_program( "Curve_pair_analysis_2.cpp" ) + create_single_source_cgal_program( "Real_embeddable_traits_extension.cpp" ) + if(RS_FOUND) + create_single_source_cgal_program( "Algebraic_kernel_rs_gmpq_d_1.cpp" ) + create_single_source_cgal_program( "Algebraic_kernel_rs_gmpz_d_1.cpp" ) + else() + message(STATUS "NOTICE: Some tests require the RS library, and will not be compiled.") + endif() else() - message(STATUS "NOTICE: Some tests require the RS library, and will not be compiled.") + message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.") endif() diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/CMakeLists.txt index 0ffdc893571..100eee87b0d 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/CMakeLists.txt @@ -23,9 +23,49 @@ if ( CGAL_FOUND ) # create a target per cppfile file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) - foreach(cppfile ${cppfiles}) - create_single_source_cgal_program( "${cppfile}" ) - endforeach() + + create_single_source_cgal_program("construction_test_suite_generator.cpp") + create_single_source_cgal_program("ex_kernel_point.cpp") + create_single_source_cgal_program("ex_kernel_segment.cpp") + create_single_source_cgal_program("test_arc_polycurve.cpp") + create_single_source_cgal_program("test_batched_point_location.cpp") + create_single_source_cgal_program("test_bezier_polycurve.cpp") + create_single_source_cgal_program("test_circular_arc_polycurve.cpp") + create_single_source_cgal_program("test_conic_polycurve.cpp") + create_single_source_cgal_program("test_construction.cpp") + create_single_source_cgal_program("test_data_traits.cpp") + create_single_source_cgal_program("test_do_equal.cpp") + create_single_source_cgal_program("test_do_intersect.cpp") + create_single_source_cgal_program("test_dual.cpp") + create_single_source_cgal_program("test_insertion.cpp") + create_single_source_cgal_program("test_io.cpp") + create_single_source_cgal_program("test_iso_verts.cpp") + create_single_source_cgal_program("test_observer.cpp") + create_single_source_cgal_program("test_overlay.cpp") + create_single_source_cgal_program("test_point_location.") + create_single_source_cgal_program("test_point_location_dynamic.cpp") + create_single_source_cgal_program("test_polycurve_intersection.cpp") + create_single_source_cgal_program("test_polylines.cpp") + create_single_source_cgal_program("test_rational_function_traits_2.cpp") + create_single_source_cgal_program("test_removal.cpp") + create_single_source_cgal_program("test_sgm.cpp") + create_single_source_cgal_program("test_spherical_merge.cpp") + create_single_source_cgal_program("test_spherical_overlay.cpp") + create_single_source_cgal_program("test_spherical_removal.cpp") + create_single_source_cgal_program("test_tags.cpp") + create_single_source_cgal_program("test_traits_adaptor.cpp") + create_single_source_cgal_program("test_traits_dispatching.cpp") + create_single_source_cgal_program("test_unbounded_rational_direct_insertion.cpp") + create_single_source_cgal_program("test_unbounded_rational_insertion.cpp") + create_single_source_cgal_program("test_unbounded_removal.cpp") + create_single_source_cgal_program("test_vertical_decomposition.cpp") + create_single_source_cgal_program("test_vert_ray_shoot_vert_segments.cpp") + create_single_source_cgal_program("test_zone.cpp") + if(CGAL_Core_FOUND) + create_single_source_cgal_program("test_traits.cpp") + else() + message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.") + endif() endif() else() diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt index 61dd2e41455..5febb776e27 100644 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt @@ -27,7 +27,12 @@ if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND (CGAL_Core_FOUND OR LEDA_FOUN # cpp files add_executable ( HDT2 HDT2.cpp ${CGAL_Qt5_RESOURCE_FILES} ${RESOURCE_FILES} ${UIS}) add_to_cached_list( CGAL_EXECUTABLE_TARGETS HDT2 ) - target_link_libraries ( HDT2 CGAL::CGAL CGAL::CGAL_Qt5 CGAL::CGAL_Core Qt5::Widgets) + target_link_libraries ( HDT2 CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Widgets) + if(CGAL_Core_FOUND) + target_link_libraries ( HDT2 CGAL::CGAL_Core) + else() + target_link_libraries ( HDT2 ${LEDA_LIBRARIES}) + endif() else() message(STATUS "NOTICE: This demo requires CGAL, CGAL_Core (or LEDA), and Qt5 and will not be compiled.") endif() diff --git a/Installation/test/Installation/CMakeLists.txt b/Installation/test/Installation/CMakeLists.txt index 7c060ba89fb..ec826619dab 100644 --- a/Installation/test/Installation/CMakeLists.txt +++ b/Installation/test/Installation/CMakeLists.txt @@ -56,7 +56,7 @@ if ( CGAL_FOUND ) create_link_to_program(CGAL) - if ( WITH_CGAL_Core ) + if ( CGAL_Core_FOUND ) create_link_to_program(CGAL_Core) endif() diff --git a/Number_types/test/Number_types/CMakeLists.txt b/Number_types/test/Number_types/CMakeLists.txt index ce8952df0e9..3fff7f845a6 100644 --- a/Number_types/test/Number_types/CMakeLists.txt +++ b/Number_types/test/Number_types/CMakeLists.txt @@ -16,7 +16,6 @@ if ( CGAL_FOUND ) include( CGAL_VersionUtils ) include_directories( BEFORE include ) - create_single_source_cgal_program( "bench_interval.cpp" ) create_single_source_cgal_program( "constant.cpp" ) create_single_source_cgal_program( "CORE_BigFloat.cpp" ) @@ -69,26 +68,29 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "unsigned.cpp" ) create_single_source_cgal_program( "utilities.cpp" ) find_package( GMP ) - if( GMP_FOUND ) + if( GMP_FOUND AND NOT CGAL_DISABLE_GMP) create_single_source_cgal_program( "CORE_Expr_ticket_4296.cpp" ) find_package( MPFI ) if( MPFI_FOUND ) include( ${MPFI_USE_FILE} ) endif( MPFI_FOUND ) endif( GMP_FOUND ) + if(CGAL_Core_FOUND) + create_single_source_cgal_program( "Gmpfi.cpp" ) + create_single_source_cgal_program( "Gmpfr_bug.cpp" ) + create_single_source_cgal_program( "eigen.cpp" ) + find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) + include(CGAL_Eigen3_support) + if (TARGET CGAL::Eigen3_support) + target_link_libraries(eigen PUBLIC CGAL::Eigen3_support) + endif() + else() + message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.") + endif() # all the programs below will be linked against MPFI in case it is present - create_single_source_cgal_program( "Gmpfi.cpp" ) - create_single_source_cgal_program( "Gmpfr_bug.cpp" ) create_single_source_cgal_program( "Quotient_new.cpp" ) create_single_source_cgal_program( "test_nt_Coercion_traits.cpp" ) - create_single_source_cgal_program( "eigen.cpp" ) - find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) - include(CGAL_Eigen3_support) - if (TARGET CGAL::Eigen3_support) - target_link_libraries(eigen PUBLIC CGAL::Eigen3_support) - endif() - else( CGAL_FOUND ) message(STATUS diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt index bbcfb4b6ef5..97d1b3df99a 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt @@ -4,47 +4,45 @@ if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() -if(TARGET CGAL::Eigen3_support) - find_package(CGAL COMPONENTS Core) +find_package(CGAL COMPONENTS Core) +include(${CGAL_USE_FILE}) - include(${CGAL_USE_FILE}) - - qt5_wrap_ui(parameterizationUI_FILES Parameterization_widget.ui OTE_dialog.ui) - polyhedron_demo_plugin(parameterization_plugin Parameterization_plugin ${parameterizationUI_FILES}) - target_link_libraries(parameterization_plugin PUBLIC scene_surface_mesh_item scene_textured_item scene_selection_item CGAL::Eigen3_support) +if(CGAL_Core_FOUND) + qt5_wrap_ui( segmentationUI_FILES Mesh_segmentation_widget.ui) + polyhedron_demo_plugin(mesh_segmentation_plugin Mesh_segmentation_plugin ${segmentationUI_FILES}) + target_link_libraries(mesh_segmentation_plugin PUBLIC scene_surface_mesh_item CGAL::CGAL_Core) + qt5_wrap_ui( mesh_simplificationUI_FILES Mesh_simplification_dialog.ui) + polyhedron_demo_plugin(mesh_simplification_plugin Mesh_simplification_plugin ${mesh_simplificationUI_FILES}) + target_link_libraries(mesh_simplification_plugin PUBLIC scene_surface_mesh_item scene_selection_item) + qt5_wrap_ui( remeshingUI_FILES Remeshing_dialog.ui) + polyhedron_demo_plugin(offset_meshing_plugin Offset_meshing_plugin ${remeshingUI_FILES}) + target_link_libraries(offset_meshing_plugin PUBLIC scene_surface_mesh_item scene_polygon_soup_item) + qt5_wrap_ui( shortestPathUI_FILES Shortest_path_widget.ui ) + polyhedron_demo_plugin(shortest_path_plugin Shortest_path_plugin ${shortestPathUI_FILES}) + target_link_libraries(shortest_path_plugin PUBLIC scene_surface_mesh_item scene_shortest_path_item scene_basic_objects) + qt5_wrap_ui(basicUI_FILES Surface_mesh_approximation_dockwidget.ui) + polyhedron_demo_plugin(surface_mesh_approximation_plugin + Surface_mesh_approximation_plugin + ${basicUI_FILES} + VSA_wrapper) + target_link_libraries(surface_mesh_approximation_plugin + PUBLIC + scene_surface_mesh_item + scene_polygon_soup_item + scene_polylines_item) + if(TARGET CGAL::Eigen3_support) + qt5_wrap_ui(parameterizationUI_FILES Parameterization_widget.ui OTE_dialog.ui) + polyhedron_demo_plugin(parameterization_plugin Parameterization_plugin ${parameterizationUI_FILES}) + target_link_libraries(parameterization_plugin PUBLIC scene_surface_mesh_item scene_textured_item scene_selection_item CGAL::Eigen3_support) + target_link_libraries(offset_meshing_plugin PUBLIC CGAL::Eigen3_support) + else() + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. The Parameterization plugin will not be available.") + endif() + if(TARGET CGAL::TBB_support) + target_link_libraries(offset_meshing_plugin PUBLIC CGAL::TBB_support) + endif() else() - message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. The Parameterization plugin will not be available.") + message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.") endif() -qt5_wrap_ui( segmentationUI_FILES Mesh_segmentation_widget.ui) -polyhedron_demo_plugin(mesh_segmentation_plugin Mesh_segmentation_plugin ${segmentationUI_FILES}) -target_link_libraries(mesh_segmentation_plugin PUBLIC scene_surface_mesh_item) -qt5_wrap_ui( mesh_simplificationUI_FILES Mesh_simplification_dialog.ui) -polyhedron_demo_plugin(mesh_simplification_plugin Mesh_simplification_plugin ${mesh_simplificationUI_FILES}) -target_link_libraries(mesh_simplification_plugin PUBLIC scene_surface_mesh_item scene_selection_item) - -qt5_wrap_ui( remeshingUI_FILES Remeshing_dialog.ui) -polyhedron_demo_plugin(offset_meshing_plugin Offset_meshing_plugin ${remeshingUI_FILES}) -target_link_libraries(offset_meshing_plugin PUBLIC scene_surface_mesh_item scene_polygon_soup_item) -if(TARGET CGAL::Eigen3_support) - target_link_libraries(offset_meshing_plugin PUBLIC CGAL::Eigen3_support) -endif() -if(TARGET CGAL::TBB_support) - target_link_libraries(offset_meshing_plugin PUBLIC CGAL::TBB_support) -endif() - -qt5_wrap_ui( shortestPathUI_FILES Shortest_path_widget.ui ) -polyhedron_demo_plugin(shortest_path_plugin Shortest_path_plugin ${shortestPathUI_FILES}) -target_link_libraries(shortest_path_plugin PUBLIC scene_surface_mesh_item scene_shortest_path_item scene_basic_objects) - -qt5_wrap_ui(basicUI_FILES Surface_mesh_approximation_dockwidget.ui) -polyhedron_demo_plugin(surface_mesh_approximation_plugin - Surface_mesh_approximation_plugin - ${basicUI_FILES} - VSA_wrapper) -target_link_libraries(surface_mesh_approximation_plugin - PUBLIC - scene_surface_mesh_item - scene_polygon_soup_item - scene_polylines_item)