mirror of https://github.com/CGAL/cgal
adding support for Eigen3 5.0.0 (6.1 version)
moving the Eigen3 version check into CGAL_Eigen3_support.cmake
This commit is contained in:
parent
a9b369650a
commit
ffda347171
|
|
@ -1,9 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script.
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
project(Barycentric_coordinates_2_Benchmarks)
|
||||
|
||||
cmake_minimum_required(VERSION 3.12...3.31)
|
||||
project(Barycentric_coordinates_2_Benchmarks)
|
||||
|
||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ project( Frechet_distance_Examples )
|
|||
find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core )
|
||||
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
create_single_source_cgal_program( "Frechet_distance_2.cpp" )
|
||||
|
|
|
|||
|
|
@ -6,11 +6,12 @@ project( Frechet_distance_Tests )
|
|||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
||||
find_package(Eigen3 QUIET)
|
||||
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
create_single_source_cgal_program( "Frechet-IssueOct25.cpp" )
|
||||
|
||||
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( "Frechet_distance_test.cpp" )
|
||||
target_link_libraries(Frechet_distance_test PRIVATE CGAL::Eigen3_support)
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@ project( classical_Frechet_distance )
|
|||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
create_single_source_cgal_program("Compute_classical_Frechet_distance_3.cpp")
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ project( Isosurfacing_3_benchmark )
|
|||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
find_package(TBB)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ project( Isosurfacing_3_Examples )
|
|||
|
||||
find_package(CGAL REQUIRED COMPONENTS ImageIO)
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
find_package(TBB QUIET)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ project(Isosurfacing_3_Tests)
|
|||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
find_package(TBB QUIET)
|
||||
|
|
|
|||
|
|
@ -28,61 +28,57 @@ 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( acvd_remeshingUI_FILES ACVD_remeshing_dialog.ui)
|
||||
cgal_lab_plugin(acvd_remeshing_plugin ACVD_remeshing_plugin ${acvd_remeshingUI_FILES} KEYWORDS PMP)
|
||||
target_link_libraries(acvd_remeshing_plugin PUBLIC scene_surface_mesh_item scene_points_with_normal_item scene_polygon_soup_item CGAL::Eigen3_support)
|
||||
qt6_wrap_ui( acvd_remeshingUI_FILES ACVD_remeshing_dialog.ui)
|
||||
cgal_lab_plugin(acvd_remeshing_plugin ACVD_remeshing_plugin ${acvd_remeshingUI_FILES} KEYWORDS PMP)
|
||||
target_link_libraries(acvd_remeshing_plugin PUBLIC scene_surface_mesh_item scene_points_with_normal_item scene_polygon_soup_item CGAL::Eigen3_support)
|
||||
|
||||
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 PRIVATE scene_surface_mesh_item scene_polylines_item scene_selection_item CGAL::Eigen3_support)
|
||||
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 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 PRIVATE 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 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
|
||||
PRIVATE
|
||||
scene_surface_mesh_item
|
||||
scene_points_with_normal_item
|
||||
scene_polylines_item
|
||||
scene_mcf_item
|
||||
demo_framework
|
||||
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 PRIVATE scene_surface_mesh_item scene_selection_item CGAL::Eigen3_support)
|
||||
find_package(Ceres QUIET)
|
||||
include(CGAL_Ceres_support)
|
||||
if(TARGET CGAL::Ceres_support)
|
||||
target_link_libraries(smoothing_plugin PRIVATE CGAL::Ceres_support)
|
||||
endif()
|
||||
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
|
||||
PRIVATE
|
||||
scene_surface_mesh_item
|
||||
scene_points_with_normal_item
|
||||
scene_polylines_item
|
||||
scene_mcf_item
|
||||
demo_framework
|
||||
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 PRIVATE scene_surface_mesh_item scene_selection_item CGAL::Eigen3_support)
|
||||
find_package(Ceres QUIET)
|
||||
include(CGAL_Ceres_support)
|
||||
if(TARGET 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 PRIVATE CGAL::Eigen3_support)
|
||||
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 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
|
||||
${remeshPlanarPatchesUI_FILES} KEYWORDS PMP CDT_3)
|
||||
target_link_libraries(remesh_planar_patches_plugin PRIVATE scene_surface_mesh_item 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 CDT_3)
|
||||
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(
|
||||
"compilation of extrude_plugin"
|
||||
"compilation of fairing_plugin"
|
||||
"compilation of hole_filling_plugin"
|
||||
"compilation of remesh_planar_patches_plugin"
|
||||
"compilation of smoothing_plugin"
|
||||
PROPERTIES RESOURCE_LOCK Selection_test_resources)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "NOTICE: The hole filling and fairing plugins require Eigen 3.2 (or higher) and will not be available.")
|
||||
if(CGAL_ENABLE_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND)
|
||||
set_tests_properties(
|
||||
"compilation of extrude_plugin"
|
||||
"compilation of fairing_plugin"
|
||||
"compilation of hole_filling_plugin"
|
||||
"compilation of remesh_planar_patches_plugin"
|
||||
"compilation of smoothing_plugin"
|
||||
PROPERTIES RESOURCE_LOCK Selection_test_resources)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "NOTICE: The hole filling and fairing plugins require Eigen 3.2 (or higher) and will not be available.")
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ cgal_lab_plugin(
|
|||
target_link_libraries(tetrahedral_remeshing_plugin PRIVATE scene_c3t3_item
|
||||
${OPENGL_gl_LIBRARY})
|
||||
CGAL_Lab_target_use_c3t3_type(tetrahedral_remeshing_plugin)
|
||||
find_package(Eigen3 QUIET) #(3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
target_link_libraries(tetrahedral_remeshing_plugin PRIVATE CGAL::Eigen3_support)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ endif()
|
|||
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
# Executables that require Eigen 3.1
|
||||
if(TARGET CGAL::TBB_support)
|
||||
create_single_source_cgal_program("poisson_reconstruction_test_surface_mesher.cpp")
|
||||
target_link_libraries(poisson_reconstruction_test_surface_mesher PRIVATE CGAL::Eigen3_support CGAL::TBB_support)
|
||||
|
|
|
|||
Loading…
Reference in New Issue