mirror of https://github.com/CGAL/cgal
De-activate some things that depend on CGAL_Core if it is not FOUND
This commit is contained in:
parent
bb36a410f8
commit
7d21d5b62d
|
|
@ -9,7 +9,7 @@ if ( CGAL_FOUND )
|
||||||
find_package(MPFI QUIET)
|
find_package(MPFI QUIET)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( CGAL_FOUND AND MPFI_FOUND)
|
if( CGAL_FOUND AND CGAL_Core_FOUND AND MPFI_FOUND)
|
||||||
|
|
||||||
include( ${CGAL_USE_FILE} )
|
include( ${CGAL_USE_FILE} )
|
||||||
include( ${MPFI_USE_FILE} )
|
include( ${MPFI_USE_FILE} )
|
||||||
|
|
@ -23,6 +23,6 @@ if( CGAL_FOUND AND MPFI_FOUND)
|
||||||
|
|
||||||
else()
|
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()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -42,26 +42,30 @@ include( ${CGAL_USE_FILE} )
|
||||||
# ##########################################################
|
# ##########################################################
|
||||||
|
|
||||||
create_single_source_cgal_program( "cyclic.cpp" )
|
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( "Descartes.cpp" )
|
||||||
create_single_source_cgal_program( "Real_embeddable_traits_extension.cpp" )
|
if(CGAL_Core_FOUND)
|
||||||
if(RS_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_gmpq_d_1.cpp" )
|
||||||
create_single_source_cgal_program( "Algebraic_kernel_rs_gmpz_d_1.cpp" )
|
create_single_source_cgal_program( "Algebraic_kernel_rs_gmpz_d_1.cpp" )
|
||||||
else()
|
else()
|
||||||
message(STATUS "NOTICE: Some tests require the RS library, and will not be compiled.")
|
message(STATUS "NOTICE: Some tests require the RS library, and will not be compiled.")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,49 @@ if ( CGAL_FOUND )
|
||||||
|
|
||||||
# create a target per cppfile
|
# create a target per cppfile
|
||||||
file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||||
foreach(cppfile ${cppfiles})
|
|
||||||
create_single_source_cgal_program( "${cppfile}" )
|
create_single_source_cgal_program("construction_test_suite_generator.cpp")
|
||||||
endforeach()
|
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()
|
endif()
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,12 @@ if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND (CGAL_Core_FOUND OR LEDA_FOUN
|
||||||
# cpp files
|
# cpp files
|
||||||
add_executable ( HDT2 HDT2.cpp ${CGAL_Qt5_RESOURCE_FILES} ${RESOURCE_FILES} ${UIS})
|
add_executable ( HDT2 HDT2.cpp ${CGAL_Qt5_RESOURCE_FILES} ${RESOURCE_FILES} ${UIS})
|
||||||
add_to_cached_list( CGAL_EXECUTABLE_TARGETS HDT2 )
|
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()
|
else()
|
||||||
message(STATUS "NOTICE: This demo requires CGAL, CGAL_Core (or LEDA), and Qt5 and will not be compiled.")
|
message(STATUS "NOTICE: This demo requires CGAL, CGAL_Core (or LEDA), and Qt5 and will not be compiled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ if ( CGAL_FOUND )
|
||||||
|
|
||||||
create_link_to_program(CGAL)
|
create_link_to_program(CGAL)
|
||||||
|
|
||||||
if ( WITH_CGAL_Core )
|
if ( CGAL_Core_FOUND )
|
||||||
create_link_to_program(CGAL_Core)
|
create_link_to_program(CGAL_Core)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ if ( CGAL_FOUND )
|
||||||
include( CGAL_VersionUtils )
|
include( CGAL_VersionUtils )
|
||||||
|
|
||||||
include_directories( BEFORE include )
|
include_directories( BEFORE include )
|
||||||
|
|
||||||
create_single_source_cgal_program( "bench_interval.cpp" )
|
create_single_source_cgal_program( "bench_interval.cpp" )
|
||||||
create_single_source_cgal_program( "constant.cpp" )
|
create_single_source_cgal_program( "constant.cpp" )
|
||||||
create_single_source_cgal_program( "CORE_BigFloat.cpp" )
|
create_single_source_cgal_program( "CORE_BigFloat.cpp" )
|
||||||
|
|
@ -69,25 +68,28 @@ if ( CGAL_FOUND )
|
||||||
create_single_source_cgal_program( "unsigned.cpp" )
|
create_single_source_cgal_program( "unsigned.cpp" )
|
||||||
create_single_source_cgal_program( "utilities.cpp" )
|
create_single_source_cgal_program( "utilities.cpp" )
|
||||||
find_package( GMP )
|
find_package( GMP )
|
||||||
if( GMP_FOUND )
|
if( GMP_FOUND AND NOT CGAL_DISABLE_GMP)
|
||||||
create_single_source_cgal_program( "CORE_Expr_ticket_4296.cpp" )
|
create_single_source_cgal_program( "CORE_Expr_ticket_4296.cpp" )
|
||||||
find_package( MPFI )
|
find_package( MPFI )
|
||||||
if( MPFI_FOUND )
|
if( MPFI_FOUND )
|
||||||
include( ${MPFI_USE_FILE} )
|
include( ${MPFI_USE_FILE} )
|
||||||
endif( MPFI_FOUND )
|
endif( MPFI_FOUND )
|
||||||
endif( GMP_FOUND )
|
endif( GMP_FOUND )
|
||||||
# all the programs below will be linked against MPFI in case it is present
|
if(CGAL_Core_FOUND)
|
||||||
create_single_source_cgal_program( "Gmpfi.cpp" )
|
create_single_source_cgal_program( "Gmpfi.cpp" )
|
||||||
create_single_source_cgal_program( "Gmpfr_bug.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" )
|
create_single_source_cgal_program( "eigen.cpp" )
|
||||||
find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater)
|
find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater)
|
||||||
include(CGAL_Eigen3_support)
|
include(CGAL_Eigen3_support)
|
||||||
if (TARGET CGAL::Eigen3_support)
|
if (TARGET CGAL::Eigen3_support)
|
||||||
target_link_libraries(eigen PUBLIC CGAL::Eigen3_support)
|
target_link_libraries(eigen PUBLIC CGAL::Eigen3_support)
|
||||||
endif()
|
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( "Quotient_new.cpp" )
|
||||||
|
create_single_source_cgal_program( "test_nt_Coercion_traits.cpp" )
|
||||||
|
|
||||||
else( CGAL_FOUND )
|
else( CGAL_FOUND )
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,47 +4,45 @@ if(POLICY CMP0074)
|
||||||
cmake_policy(SET CMP0074 NEW)
|
cmake_policy(SET CMP0074 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(TARGET CGAL::Eigen3_support)
|
find_package(CGAL COMPONENTS Core)
|
||||||
find_package(CGAL COMPONENTS Core)
|
include(${CGAL_USE_FILE})
|
||||||
|
|
||||||
include(${CGAL_USE_FILE})
|
if(CGAL_Core_FOUND)
|
||||||
|
qt5_wrap_ui( segmentationUI_FILES Mesh_segmentation_widget.ui)
|
||||||
qt5_wrap_ui(parameterizationUI_FILES Parameterization_widget.ui OTE_dialog.ui)
|
polyhedron_demo_plugin(mesh_segmentation_plugin Mesh_segmentation_plugin ${segmentationUI_FILES})
|
||||||
polyhedron_demo_plugin(parameterization_plugin Parameterization_plugin ${parameterizationUI_FILES})
|
target_link_libraries(mesh_segmentation_plugin PUBLIC scene_surface_mesh_item CGAL::CGAL_Core)
|
||||||
target_link_libraries(parameterization_plugin PUBLIC scene_surface_mesh_item scene_textured_item scene_selection_item CGAL::Eigen3_support)
|
qt5_wrap_ui( mesh_simplificationUI_FILES Mesh_simplification_dialog.ui)
|
||||||
else()
|
polyhedron_demo_plugin(mesh_simplification_plugin Mesh_simplification_plugin ${mesh_simplificationUI_FILES})
|
||||||
message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. The Parameterization plugin will not be available.")
|
target_link_libraries(mesh_simplification_plugin PUBLIC scene_surface_mesh_item scene_selection_item)
|
||||||
endif()
|
qt5_wrap_ui( remeshingUI_FILES Remeshing_dialog.ui)
|
||||||
|
polyhedron_demo_plugin(offset_meshing_plugin Offset_meshing_plugin ${remeshingUI_FILES})
|
||||||
qt5_wrap_ui( segmentationUI_FILES Mesh_segmentation_widget.ui)
|
target_link_libraries(offset_meshing_plugin PUBLIC scene_surface_mesh_item scene_polygon_soup_item)
|
||||||
polyhedron_demo_plugin(mesh_segmentation_plugin Mesh_segmentation_plugin ${segmentationUI_FILES})
|
qt5_wrap_ui( shortestPathUI_FILES Shortest_path_widget.ui )
|
||||||
target_link_libraries(mesh_segmentation_plugin PUBLIC scene_surface_mesh_item)
|
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( mesh_simplificationUI_FILES Mesh_simplification_dialog.ui)
|
qt5_wrap_ui(basicUI_FILES Surface_mesh_approximation_dockwidget.ui)
|
||||||
polyhedron_demo_plugin(mesh_simplification_plugin Mesh_simplification_plugin ${mesh_simplificationUI_FILES})
|
polyhedron_demo_plugin(surface_mesh_approximation_plugin
|
||||||
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
|
Surface_mesh_approximation_plugin
|
||||||
${basicUI_FILES}
|
${basicUI_FILES}
|
||||||
VSA_wrapper)
|
VSA_wrapper)
|
||||||
target_link_libraries(surface_mesh_approximation_plugin
|
target_link_libraries(surface_mesh_approximation_plugin
|
||||||
PUBLIC
|
PUBLIC
|
||||||
scene_surface_mesh_item
|
scene_surface_mesh_item
|
||||||
scene_polygon_soup_item
|
scene_polygon_soup_item
|
||||||
scene_polylines_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: Some tests require the CGAL_Core library, and will not be compiled.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue