From d45c4a2b2e95d8295f6284c71ff8560642854cd4 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Wed, 3 Jul 2024 14:00:50 +0200 Subject: [PATCH 1/6] update FindOpenMesh.cmake --- Installation/cmake/modules/FindOpenMesh.cmake | 89 +++++++++++-------- 1 file changed, 54 insertions(+), 35 deletions(-) diff --git a/Installation/cmake/modules/FindOpenMesh.cmake b/Installation/cmake/modules/FindOpenMesh.cmake index 86b6eaebc9e..df51ed716ce 100644 --- a/Installation/cmake/modules/FindOpenMesh.cmake +++ b/Installation/cmake/modules/FindOpenMesh.cmake @@ -17,63 +17,82 @@ if (NOT OpenMesh_FOUND) ENV OPENMESH_DIR /usr/include /usr/local/include - PATH_SUFFIXES src + PATH_SUFFIXES src include DOC "The directory containing the OpenMesh header files WITHOUT the OpenMesh prefix" ) - find_library(OPENMESH_LIBRARY_RELEASE NAMES "OpenMeshCore" + find_library(OPENMESH_CORE_LIBRARY_RELEASE NAMES "OpenMeshCore" HINTS ENV OPENMESH_LIB_DIR ENV OPENMESH_DIR PATH_SUFFIXES lib DOC "Path to the OpenMeshCore library" ) - find_library(OPENMESH_LIBRARY_DEBUG NAMES "OpenMeshCored" + find_library(OPENMESH_CORE_LIBRARY_DEBUG NAMES "OpenMeshCored" HINTS ENV OPENMESH_LIB_DIR ENV OPENMESH_DIR PATH_SUFFIXES lib DOC "Path to the OpenMeshCored library" ) - if(OPENMESH_LIBRARY_RELEASE) - if(OPENMESH_LIBRARY_DEBUG) - set(OPENMESH_LIBRARIES optimized ${OPENMESH_LIBRARY_RELEASE} debug ${OPENMESH_LIBRARY_DEBUG}) - else() - set(OPENMESH_LIBRARIES ${OPENMESH_LIBRARY_RELEASE}) - endif() - endif() -endif() + find_library(OPENMESH_TOOLS_LIBRARY_RELEASE NAMES "OpenMeshTools" + HINTS ENV OPENMESH_LIB_DIR + ENV OPENMESH_DIR + PATH_SUFFIXES lib + DOC "Path to the OpenMeshTools library" + ) -include( FindPackageHandleStandardArgs ) + find_library(OPENMESH_TOOLS_LIBRARY_DEBUG NAMES "OpenMeshToolsd" + HINTS ENV OPENMESH_LIB_DIR + ENV OPENMESH_DIR + PATH_SUFFIXES lib + DOC "Path to the OpenMeshToolsd library" + ) -find_package_handle_standard_args(OpenMesh - REQUIRED_VARS OPENMESH_INCLUDE_DIR OPENMESH_LIBRARIES - FOUND_VAR OpenMesh_FOUND - ) + #select configuration depending on platform (optimized... on windows) + include(SelectLibraryConfigurations) + select_library_configurations( OPENMESH_TOOLS ) + select_library_configurations( OPENMESH_CORE ) -if(OpenMesh_FOUND AND NOT TARGET OpenMesh::OpenMesh) - add_library(OpenMesh::OpenMesh UNKNOWN IMPORTED) + set(OPENMESH_LIBRARIES ${OPENMESH_CORE_LIBRARY} ${OPENMESH_TOOLS_LIBRARY} ) + set(OPENMESH_INCLUDE_DIRS ${OPENMESH_INCLUDE_DIR} ) - if(TARGET OpenMeshCore) - target_link_libraries(OpenMesh::OpenMesh INTERFACE OpenMeshCore) - return() - endif() + include( FindPackageHandleStandardArgs ) + find_package_handle_standard_args(OpenMesh + REQUIRED_VARS OPENMESH_INCLUDE_DIRS OPENMESH_LIBRARIES + FOUND_VAR OpenMesh_FOUND + ) - set_target_properties(OpenMesh::OpenMesh PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "CGAL_USE_OPENMESH;NOMINMAX;_USE_MATH_DEFINES" - INTERFACE_INCLUDE_DIRECTORIES "${OPENMESH_INCLUDE_DIR}") + #target OpenMesh::OpenMesh + if(OpenMesh_FOUND AND NOT TARGET OpenMesh::OpenMesh) + add_library(OpenMesh::OpenMesh UNKNOWN IMPORTED) - if(OPENMESH_LIBRARY_RELEASE) - set_property(TARGET OpenMesh::OpenMesh APPEND PROPERTY - IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(OpenMesh::OpenMesh PROPERTIES - IMPORTED_LOCATION_RELEASE "${OPENMESH_LIBRARY_RELEASE}") - endif() + if(TARGET OpenMeshCore) + target_link_libraries(OpenMesh::OpenMesh INTERFACE OpenMeshCore) + return() + endif() - if(OPENMESH_LIBRARY_DEBUG) - set_property(TARGET OpenMesh::OpenMesh APPEND PROPERTY - IMPORTED_CONFIGURATIONS DEBUG) set_target_properties(OpenMesh::OpenMesh PROPERTIES - IMPORTED_LOCATION_DEBUG "${OPENMESH_LIBRARY_DEBUG}") + INTERFACE_COMPILE_DEFINITIONS "CGAL_USE_OPENMESH;NOMINMAX;_USE_MATH_DEFINES" + INTERFACE_INCLUDE_DIRECTORIES "${OPENMESH_INCLUDE_DIRS}") + + if(OPENMESH_CORE_LIBRARY_RELEASE) + set_property(TARGET OpenMesh::OpenMesh APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(OpenMesh::OpenMesh PROPERTIES + IMPORTED_LOCATION_RELEASE "${OPENMESH_CORE_LIBRARY_RELEASE}") + endif() + + if(OPENMESH_CORE_LIBRARY_DEBUG) + set_property(TARGET OpenMesh::OpenMesh APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(OpenMesh::OpenMesh PROPERTIES + IMPORTED_LOCATION_DEBUG "${OPENMESH_CORE_LIBRARY_DEBUG}") + endif() endif() + endif() + +if(OpenMesh_FOUND) + message(STATUS "OpenMesh found") +endif() \ No newline at end of file From 328c919d673723ef3f6f9965cdc686f15e43eadc Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 25 Jul 2024 10:54:30 +0200 Subject: [PATCH 2/6] wip CGAL_OpenMesh_support --- .../cmake/modules/CGAL_OpenMesh_support.cmake | 23 +++++++++++++++++++ Installation/cmake/modules/FindOpenMesh.cmake | 14 +++++------ Installation/cmake/modules/UseOpenMesh.cmake | 2 ++ 3 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 Installation/cmake/modules/CGAL_OpenMesh_support.cmake diff --git a/Installation/cmake/modules/CGAL_OpenMesh_support.cmake b/Installation/cmake/modules/CGAL_OpenMesh_support.cmake new file mode 100644 index 00000000000..1154b2f2cff --- /dev/null +++ b/Installation/cmake/modules/CGAL_OpenMesh_support.cmake @@ -0,0 +1,23 @@ + +if(OpenMesh_FOUND AND NOT TARGET CGAL::OpenMesh_support) + + add_library(CGAL::OpenMesh_support UNKNOWN IMPORTED) + + set_target_properties(OpenMesh::OpenMesh PROPERTIES + INTERFACE_COMPILE_DEFINITIONS "CGAL_USE_OPENMESH;NOMINMAX;_USE_MATH_DEFINES" + INTERFACE_INCLUDE_DIRECTORIES "${OPENMESH_INCLUDE_DIRS}") + + if(OPENMESH_CORE_LIBRARY_RELEASE) + set_property(TARGET OpenMesh::OpenMesh APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(OpenMesh::OpenMesh PROPERTIES + IMPORTED_LOCATION_RELEASE "${OPENMESH_CORE_LIBRARY_RELEASE}") + endif() + + if(OPENMESH_CORE_LIBRARY_DEBUG) + set_property(TARGET OpenMesh::OpenMesh APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(OpenMesh::OpenMesh PROPERTIES + IMPORTED_LOCATION_DEBUG "${OPENMESH_CORE_LIBRARY_DEBUG}") + endif() +endif() diff --git a/Installation/cmake/modules/FindOpenMesh.cmake b/Installation/cmake/modules/FindOpenMesh.cmake index df51ed716ce..1c9d2198ed9 100644 --- a/Installation/cmake/modules/FindOpenMesh.cmake +++ b/Installation/cmake/modules/FindOpenMesh.cmake @@ -65,28 +65,28 @@ if (NOT OpenMesh_FOUND) #target OpenMesh::OpenMesh if(OpenMesh_FOUND AND NOT TARGET OpenMesh::OpenMesh) - add_library(OpenMesh::OpenMesh UNKNOWN IMPORTED) + add_library(CGAL_OpenMesh::CGAL_OpenMesh UNKNOWN IMPORTED) if(TARGET OpenMeshCore) - target_link_libraries(OpenMesh::OpenMesh INTERFACE OpenMeshCore) + target_link_libraries(CGAL_OpenMesh::CGAL_OpenMesh INTERFACE OpenMeshCore) return() endif() - set_target_properties(OpenMesh::OpenMesh PROPERTIES + set_target_properties(CGAL_OpenMesh::CGAL_OpenMesh PROPERTIES INTERFACE_COMPILE_DEFINITIONS "CGAL_USE_OPENMESH;NOMINMAX;_USE_MATH_DEFINES" INTERFACE_INCLUDE_DIRECTORIES "${OPENMESH_INCLUDE_DIRS}") if(OPENMESH_CORE_LIBRARY_RELEASE) - set_property(TARGET OpenMesh::OpenMesh APPEND PROPERTY + set_property(TARGET CGAL_OpenMesh::CGAL_OpenMesh APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(OpenMesh::OpenMesh PROPERTIES + set_target_properties(CGAL_OpenMesh::CGAL_OpenMesh PROPERTIES IMPORTED_LOCATION_RELEASE "${OPENMESH_CORE_LIBRARY_RELEASE}") endif() if(OPENMESH_CORE_LIBRARY_DEBUG) - set_property(TARGET OpenMesh::OpenMesh APPEND PROPERTY + set_property(TARGET CGAL_OpenMesh::CGAL_OpenMesh APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties(OpenMesh::OpenMesh PROPERTIES + set_target_properties(CGAL_OpenMesh::CGAL_OpenMesh PROPERTIES IMPORTED_LOCATION_DEBUG "${OPENMESH_CORE_LIBRARY_DEBUG}") endif() endif() diff --git a/Installation/cmake/modules/UseOpenMesh.cmake b/Installation/cmake/modules/UseOpenMesh.cmake index 23449d7cdf9..2d08d3f98fe 100644 --- a/Installation/cmake/modules/UseOpenMesh.cmake +++ b/Installation/cmake/modules/UseOpenMesh.cmake @@ -3,3 +3,5 @@ include_directories ( ${OPENMESH_INCLUDE_DIR} ) add_definitions( -DNOMINMAX -D_USE_MATH_DEFINES ) + +message(DEPRECATION "This file UseOpenMesh.cmake is deprecated, and the imported target `CGAL::Eigen3_support` from CGAL_OpenMesh_support.cmake should be used instead.") From 603f6a5a032ab9b61537d18a0f532b593a7b108f Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 27 Aug 2024 14:00:46 +0200 Subject: [PATCH 3/6] OpenMesh >= 10.0 have a OpenMeshConfig.cmake file so we do not need FindOpenMesh.cmake anymore We add the target CGAL::OpenMesh_support to make it uniform with other dependencies --- .../cmake/modules/CGAL_OpenMesh_support.cmake | 24 ++--- Installation/cmake/modules/FindOpenMesh.cmake | 98 ------------------- Installation/cmake/modules/UseOpenMesh.cmake | 7 -- 3 files changed, 9 insertions(+), 120 deletions(-) delete mode 100644 Installation/cmake/modules/FindOpenMesh.cmake delete mode 100644 Installation/cmake/modules/UseOpenMesh.cmake diff --git a/Installation/cmake/modules/CGAL_OpenMesh_support.cmake b/Installation/cmake/modules/CGAL_OpenMesh_support.cmake index 1154b2f2cff..97df95c8115 100644 --- a/Installation/cmake/modules/CGAL_OpenMesh_support.cmake +++ b/Installation/cmake/modules/CGAL_OpenMesh_support.cmake @@ -1,23 +1,17 @@ if(OpenMesh_FOUND AND NOT TARGET CGAL::OpenMesh_support) - add_library(CGAL::OpenMesh_support UNKNOWN IMPORTED) + add_library(CGAL::OpenMesh_support INTERFACE IMPORTED) - set_target_properties(OpenMesh::OpenMesh PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "CGAL_USE_OPENMESH;NOMINMAX;_USE_MATH_DEFINES" - INTERFACE_INCLUDE_DIRECTORIES "${OPENMESH_INCLUDE_DIRS}") - - if(OPENMESH_CORE_LIBRARY_RELEASE) - set_property(TARGET OpenMesh::OpenMesh APPEND PROPERTY - IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(OpenMesh::OpenMesh PROPERTIES - IMPORTED_LOCATION_RELEASE "${OPENMESH_CORE_LIBRARY_RELEASE}") + if(TARGET OpenMeshCore) + target_link_libraries(CGAL::OpenMesh_support INTERFACE OpenMeshCore) endif() - if(OPENMESH_CORE_LIBRARY_DEBUG) - set_property(TARGET OpenMesh::OpenMesh APPEND PROPERTY - IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties(OpenMesh::OpenMesh PROPERTIES - IMPORTED_LOCATION_DEBUG "${OPENMESH_CORE_LIBRARY_DEBUG}") + if(TARGET OpenMeshTools) + target_link_libraries(CGAL::OpenMesh_support INTERFACE OpenMeshTools) endif() + + target_compile_definitions(CGAL::OpenMesh_support + INTERFACE "CGAL_USE_OPENMESH;NOMINMAX;_USE_MATH_DEFINES") + endif() diff --git a/Installation/cmake/modules/FindOpenMesh.cmake b/Installation/cmake/modules/FindOpenMesh.cmake deleted file mode 100644 index 1c9d2198ed9..00000000000 --- a/Installation/cmake/modules/FindOpenMesh.cmake +++ /dev/null @@ -1,98 +0,0 @@ -#This modules tries to find OpenMesh -# Once done this will define -# -# OpenMesh_FOUND - system has OpenMesh -# OPENMESH_INCLUDE_DIR - OpenMesh include directory -# OPENMESH_LIBRARIES - OpenMesh libraries -# - -find_package(OpenMesh NO_MODULE QUIET) - -# Is it already configured? -if (NOT OpenMesh_FOUND) - - find_path(OPENMESH_INCLUDE_DIR - NAMES OpenMesh/Core/Mesh/ArrayKernel.hh - HINTS ENV OPENMESH_INC_DIR - ENV OPENMESH_DIR - /usr/include - /usr/local/include - PATH_SUFFIXES src include - DOC "The directory containing the OpenMesh header files WITHOUT the OpenMesh prefix" - ) - - find_library(OPENMESH_CORE_LIBRARY_RELEASE NAMES "OpenMeshCore" - HINTS ENV OPENMESH_LIB_DIR - ENV OPENMESH_DIR - PATH_SUFFIXES lib - DOC "Path to the OpenMeshCore library" - ) - - find_library(OPENMESH_CORE_LIBRARY_DEBUG NAMES "OpenMeshCored" - HINTS ENV OPENMESH_LIB_DIR - ENV OPENMESH_DIR - PATH_SUFFIXES lib - DOC "Path to the OpenMeshCored library" - ) - - find_library(OPENMESH_TOOLS_LIBRARY_RELEASE NAMES "OpenMeshTools" - HINTS ENV OPENMESH_LIB_DIR - ENV OPENMESH_DIR - PATH_SUFFIXES lib - DOC "Path to the OpenMeshTools library" - ) - - find_library(OPENMESH_TOOLS_LIBRARY_DEBUG NAMES "OpenMeshToolsd" - HINTS ENV OPENMESH_LIB_DIR - ENV OPENMESH_DIR - PATH_SUFFIXES lib - DOC "Path to the OpenMeshToolsd library" - ) - - #select configuration depending on platform (optimized... on windows) - include(SelectLibraryConfigurations) - select_library_configurations( OPENMESH_TOOLS ) - select_library_configurations( OPENMESH_CORE ) - - set(OPENMESH_LIBRARIES ${OPENMESH_CORE_LIBRARY} ${OPENMESH_TOOLS_LIBRARY} ) - set(OPENMESH_INCLUDE_DIRS ${OPENMESH_INCLUDE_DIR} ) - - include( FindPackageHandleStandardArgs ) - find_package_handle_standard_args(OpenMesh - REQUIRED_VARS OPENMESH_INCLUDE_DIRS OPENMESH_LIBRARIES - FOUND_VAR OpenMesh_FOUND - ) - - #target OpenMesh::OpenMesh - if(OpenMesh_FOUND AND NOT TARGET OpenMesh::OpenMesh) - add_library(CGAL_OpenMesh::CGAL_OpenMesh UNKNOWN IMPORTED) - - if(TARGET OpenMeshCore) - target_link_libraries(CGAL_OpenMesh::CGAL_OpenMesh INTERFACE OpenMeshCore) - return() - endif() - - set_target_properties(CGAL_OpenMesh::CGAL_OpenMesh PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "CGAL_USE_OPENMESH;NOMINMAX;_USE_MATH_DEFINES" - INTERFACE_INCLUDE_DIRECTORIES "${OPENMESH_INCLUDE_DIRS}") - - if(OPENMESH_CORE_LIBRARY_RELEASE) - set_property(TARGET CGAL_OpenMesh::CGAL_OpenMesh APPEND PROPERTY - IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(CGAL_OpenMesh::CGAL_OpenMesh PROPERTIES - IMPORTED_LOCATION_RELEASE "${OPENMESH_CORE_LIBRARY_RELEASE}") - endif() - - if(OPENMESH_CORE_LIBRARY_DEBUG) - set_property(TARGET CGAL_OpenMesh::CGAL_OpenMesh APPEND PROPERTY - IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties(CGAL_OpenMesh::CGAL_OpenMesh PROPERTIES - IMPORTED_LOCATION_DEBUG "${OPENMESH_CORE_LIBRARY_DEBUG}") - endif() - endif() - -endif() - -if(OpenMesh_FOUND) - message(STATUS "OpenMesh found") -endif() \ No newline at end of file diff --git a/Installation/cmake/modules/UseOpenMesh.cmake b/Installation/cmake/modules/UseOpenMesh.cmake deleted file mode 100644 index 2d08d3f98fe..00000000000 --- a/Installation/cmake/modules/UseOpenMesh.cmake +++ /dev/null @@ -1,7 +0,0 @@ -# This module setups the compiler for using the OpenMesh library. -# It assumes that find_package(OpenMesh) was already called. - -include_directories ( ${OPENMESH_INCLUDE_DIR} ) -add_definitions( -DNOMINMAX -D_USE_MATH_DEFINES ) - -message(DEPRECATION "This file UseOpenMesh.cmake is deprecated, and the imported target `CGAL::Eigen3_support` from CGAL_OpenMesh_support.cmake should be used instead.") From 3f6083e6ffbcc52807c2ac2d69163de7e2d5d9a4 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 27 Aug 2024 14:02:37 +0200 Subject: [PATCH 4/6] use CGAL::OpenMesh_support in examples and tests --- BGL/examples/BGL_OpenMesh/CMakeLists.txt | 6 ++-- BGL/examples/BGL_polyhedron_3/CMakeLists.txt | 6 ++-- BGL/test/BGL/CMakeLists.txt | 28 +++++++------------ .../test/Combinatorial_map/CMakeLists.txt | 11 ++++---- .../examples/Convex_hull_3/CMakeLists.txt | 8 +++--- .../Polygon_mesh_processing/CMakeLists.txt | 19 ++++++------- .../Polygon_mesh_processing/CMakeLists.txt | 6 ++-- Property_map/test/Property_map/CMakeLists.txt | 8 ++---- .../test/STL_Extension/CMakeLists.txt | 6 ++-- .../Surface_mesh_deformation/CMakeLists.txt | 6 ++-- .../Surface_mesh_deformation/CMakeLists.txt | 6 ++-- .../Surface_mesh_segmentation/CMakeLists.txt | 6 ++-- .../Surface_mesh_shortest_path/CMakeLists.txt | 6 ++-- .../CMakeLists.txt | 6 ++-- .../CMakeLists.txt | 6 ++-- 15 files changed, 61 insertions(+), 73 deletions(-) diff --git a/BGL/examples/BGL_OpenMesh/CMakeLists.txt b/BGL/examples/BGL_OpenMesh/CMakeLists.txt index d11ac1444c9..36a1968b752 100644 --- a/BGL/examples/BGL_OpenMesh/CMakeLists.txt +++ b/BGL/examples/BGL_OpenMesh/CMakeLists.txt @@ -7,11 +7,11 @@ project(BGL_OpenMesh_Examples) # CGAL and its components find_package(CGAL REQUIRED) -find_package(OpenMesh) +find_package(OpenMesh CONFIG) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_support) create_single_source_cgal_program("TriMesh.cpp") - target_link_libraries(TriMesh PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(TriMesh PRIVATE CGAL::OpenMesh_support) else() message("NOTICE: This project requires OpenMesh and will not be compiled.") endif() diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index 7c901c71d8e..cd6f6827467 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -16,10 +16,10 @@ create_single_source_cgal_program("range.cpp") create_single_source_cgal_program("transform_iterator.cpp") create_single_source_cgal_program("copy_polyhedron.cpp") -find_package(OpenMesh QUIET) +find_package(OpenMesh CONFIG QUIET) if(OpenMesh_FOUND) - target_link_libraries(copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES}) - target_compile_definitions(copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH) + include(CGAL_OpenMesh_support) + target_link_libraries(copy_polyhedron PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: The example 'copy_polyhedron' will not use OpenMesh.") endif() diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index fd43a685fe5..1f5bbb9ecd9 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -40,28 +40,20 @@ create_single_source_cgal_program("bench_read_from_stream_vs_add_face_and_add_fa create_single_source_cgal_program("graph_traits_inheritance.cpp" ) create_single_source_cgal_program("test_deprecated_io.cpp") -find_package(OpenMesh QUIET) +find_package(OpenMesh CONFIG QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) - add_definitions(-DCGAL_USE_OPENMESH) + include(CGAL_OpenMesh_support) - target_link_libraries(test_clear PRIVATE ${OPENMESH_LIBRARIES}) - target_compile_definitions(test_clear PRIVATE -DCGAL_USE_OPENMESH) - target_link_libraries(test_Euler_operations PRIVATE ${OPENMESH_LIBRARIES}) - target_compile_definitions(test_Euler_operations PRIVATE -DCGAL_USE_OPENMESH) - target_link_libraries(test_Collapse_edge PRIVATE ${OPENMESH_LIBRARIES}) - target_compile_definitions(test_Collapse_edge PRIVATE -DCGAL_USE_OPENMESH) - target_link_libraries(test_Face_filtered_graph PRIVATE ${OPENMESH_LIBRARIES}) - target_compile_definitions(test_Face_filtered_graph PRIVATE -DCGAL_USE_OPENMESH) - target_link_libraries(test_graph_traits PRIVATE ${OPENMESH_LIBRARIES} ) - target_compile_definitions(test_graph_traits PRIVATE -DCGAL_USE_OPENMESH) - target_link_libraries(test_Properties PRIVATE ${OPENMESH_LIBRARIES}) - target_compile_definitions(test_Properties PRIVATE -DCGAL_USE_OPENMESH) - target_link_libraries(test_bgl_read_write PRIVATE ${OPENMESH_LIBRARIES}) - target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_OPENMESH) + target_link_libraries(test_clear PRIVATE CGAL::OpenMesh_support) + target_link_libraries(test_Euler_operations PRIVATE CGAL::OpenMesh_support) + target_link_libraries(test_Collapse_edge PRIVATE CGAL::OpenMesh_support) + target_link_libraries(test_Face_filtered_graph PRIVATE CGAL::OpenMesh_support) + target_link_libraries(test_graph_traits PRIVATE CGAL::OpenMesh_support ) + target_link_libraries(test_Properties PRIVATE CGAL::OpenMesh_support) + target_link_libraries(test_bgl_read_write PRIVATE CGAL::OpenMesh_support) create_single_source_cgal_program("graph_concept_OpenMesh.cpp") - target_link_libraries(graph_concept_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(graph_concept_OpenMesh PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.") endif() diff --git a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt index d0c26ec31c5..17d31b5fbcf 100644 --- a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt +++ b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt @@ -27,14 +27,13 @@ cgal_add_compilation_test(Combinatorial_map_copy_test_index) create_single_source_cgal_program(cmap_test_split_attribute.cpp) # Link with OpenMesh if possible -find_package(OpenMesh QUIET) -if(TARGET OpenMesh::OpenMesh) +find_package(OpenMesh CONFIG QUIET) +if(OpenMesh_FOUND) message(STATUS "Found OpenMesh") + include(CGAL_OpenMesh_support) - target_link_libraries(Combinatorial_map_copy_test PRIVATE OpenMesh::OpenMesh) - target_compile_definitions(Combinatorial_map_copy_test PRIVATE -DCGAL_USE_OPENMESH) - target_link_libraries(Combinatorial_map_copy_test_index PRIVATE OpenMesh::OpenMesh) - target_compile_definitions(Combinatorial_map_copy_test_index PRIVATE -DCGAL_USE_OPENMESH) + target_link_libraries(Combinatorial_map_copy_test PRIVATE CGAL::OpenMesh_support) + target_link_libraries(Combinatorial_map_copy_test_index PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Tests will not use OpenMesh.") endif() diff --git a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt index 4b6f08ba252..7a72a7c4caf 100644 --- a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt @@ -19,15 +19,15 @@ create_single_source_cgal_program("quickhull_any_dim_3.cpp") create_single_source_cgal_program("extreme_points_3_sm.cpp") create_single_source_cgal_program("extreme_indices_3.cpp") -find_package(OpenMesh QUIET) +find_package(OpenMesh CONFIG QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") create_single_source_cgal_program("quickhull_OM_3.cpp") - target_link_libraries(quickhull_OM_3 PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(quickhull_OM_3 PRIVATE CGAL::OpenMesh_support) create_single_source_cgal_program("dynamic_hull_OM_3.cpp") - target_link_libraries(dynamic_hull_OM_3 PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(dynamic_hull_OM_3 PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt index 718ab1096a9..911ea62ce07 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt @@ -93,32 +93,31 @@ else() message(STATUS "NOTICE: Examples that use Eigen will not be compiled.") endif() -find_package(OpenMesh QUIET) +find_package(OpenMesh CONFIG QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_support) create_single_source_cgal_program("compute_normals_example_OM.cpp") - target_link_libraries(compute_normals_example_OM PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(compute_normals_example_OM PRIVATE CGAL::OpenMesh_support) create_single_source_cgal_program("corefinement_OM_union.cpp") - target_link_libraries(corefinement_OM_union PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(corefinement_OM_union PRIVATE CGAL::OpenMesh_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("hole_filling_example_OM.cpp") - target_link_libraries(hole_filling_example_OM PRIVATE CGAL::Eigen3_support ${OPENMESH_LIBRARIES}) + target_link_libraries(hole_filling_example_OM PRIVATE CGAL::Eigen3_support CGAL::OpenMesh_support) endif() create_single_source_cgal_program("point_inside_example_OM.cpp") - target_link_libraries(point_inside_example_OM PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(point_inside_example_OM PRIVATE CGAL::OpenMesh_support) create_single_source_cgal_program("stitch_borders_example_OM.cpp") - target_link_libraries(stitch_borders_example_OM PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(stitch_borders_example_OM PRIVATE CGAL::OpenMesh_support) #create_single_source_cgal_program("remove_degeneracies_example.cpp") - #target_link_libraries(remove_degeneracies_example PRIVATE ${OPENMESH_LIBRARIES}) - #target_compile_definitions(remove_degeneracies_example PRIVATE -DCGAL_USE_OPENMESH) + #target_link_libraries(remove_degeneracies_example PRIVATE CGAL::OpenMesh_support) create_single_source_cgal_program("triangulate_faces_example_OM.cpp") - target_link_libraries(triangulate_faces_example_OM PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(triangulate_faces_example_OM PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Examples that use OpenMesh 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 f814501997c..3d78756fba8 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -112,11 +112,11 @@ else() message(STATUS "NOTICE: Intel TBB was not found. Tests will use sequential code.") endif() -find_package(OpenMesh QUIET) +find_package(OpenMesh CONFIG QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_support) create_single_source_cgal_program("remeshing_test_P_SM_OM.cpp") - target_link_libraries(remeshing_test_P_SM_OM PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(remeshing_test_P_SM_OM PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.") endif() diff --git a/Property_map/test/Property_map/CMakeLists.txt b/Property_map/test/Property_map/CMakeLists.txt index 92a3eb097d5..78f43581afc 100644 --- a/Property_map/test/Property_map/CMakeLists.txt +++ b/Property_map/test/Property_map/CMakeLists.txt @@ -10,13 +10,11 @@ create_single_source_cgal_program("dynamic_properties_test.cpp") create_single_source_cgal_program("kernel_converter_properties_test.cpp") create_single_source_cgal_program("test_Property_container.cpp") -find_package(OpenMesh QUIET) +find_package(OpenMesh CONFIG QUIET) if(OpenMesh_FOUND) message(STATUS "Found OpenMesh") - include(UseOpenMesh) - - target_link_libraries(dynamic_properties_test PRIVATE ${OPENMESH_LIBRARIES}) - target_compile_definitions(dynamic_properties_test PRIVATE -DCGAL_USE_OPENMESH) + include(CGAL_OpenMesh_support) + target_link_libraries(dynamic_properties_test PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Tests will not use OpenMesh.") endif() diff --git a/STL_Extension/test/STL_Extension/CMakeLists.txt b/STL_Extension/test/STL_Extension/CMakeLists.txt index ee978530077..902664e75c8 100644 --- a/STL_Extension/test/STL_Extension/CMakeLists.txt +++ b/STL_Extension/test/STL_Extension/CMakeLists.txt @@ -61,13 +61,13 @@ if(TARGET CGAL::TBB_support) target_link_libraries(test_for_each PUBLIC CGAL::TBB_support) endif() -find_package(OpenMesh QUIET) +find_package(OpenMesh CONFIG QUIET) if(OpenMesh_FOUND) message(STATUS "Found OpenMesh") - include(UseOpenMesh) + include(CGAL_OpenMesh_support) create_single_source_cgal_program("test_hash_OpenMesh.cpp") - target_link_libraries(test_hash_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(test_hash_OpenMesh PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Tests that use OpenMesh 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 ab336b9fb26..0d93d45eda9 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt @@ -31,14 +31,14 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() - find_package(OpenMesh QUIET) + find_package(OpenMesh CONFIG QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") create_single_source_cgal_program("all_roi_assign_example_with_OpenMesh.cpp") target_link_libraries(all_roi_assign_example_with_OpenMesh - PRIVATE ${OPENMESH_LIBRARIES} CGAL::Eigen3_support) + PRIVATE CGAL::OpenMesh_support CGAL::Eigen3_support) else() message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt index 398dd703748..b34653b68ec 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt @@ -16,14 +16,14 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("Symmetry_test.cpp") target_link_libraries(Symmetry_test PUBLIC CGAL::Eigen3_support) - find_package(OpenMesh QUIET) + find_package(OpenMesh CONFIG QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") create_single_source_cgal_program("Cactus_deformation_session_OpenMesh.cpp") target_link_libraries(Cactus_deformation_session_OpenMesh - PRIVATE ${OPENMESH_LIBRARIES} CGAL::Eigen3_support) + PRIVATE CGAL::OpenMesh_support CGAL::Eigen3_support) else() message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() diff --git a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt index 5ef633bb539..f944ad20b2f 100644 --- a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt +++ b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt @@ -15,13 +15,13 @@ create_single_source_cgal_program("segmentation_from_sdf_values_SM_example.cpp") create_single_source_cgal_program("segmentation_from_sdf_values_LCC_example.cpp") create_single_source_cgal_program("extract_segmentation_into_mesh_example.cpp") -find_package(OpenMesh QUIET) +find_package(OpenMesh CONFIG QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") create_single_source_cgal_program("segmentation_from_sdf_values_OpenMesh_example.cpp") - target_link_libraries(segmentation_from_sdf_values_OpenMesh_example PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(segmentation_from_sdf_values_OpenMesh_example PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() diff --git a/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt b/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt index 5238bd06c18..e605b7cbaf4 100644 --- a/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt @@ -13,13 +13,13 @@ create_single_source_cgal_program("shortest_paths_with_id.cpp") create_single_source_cgal_program("shortest_paths.cpp") create_single_source_cgal_program("shortest_path_with_locate.cpp") -find_package(OpenMesh QUIET) +find_package(OpenMesh CONFIG QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") create_single_source_cgal_program("shortest_paths_OpenMesh.cpp") - target_link_libraries(shortest_paths_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(shortest_paths_OpenMesh PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Examples that use OpenMesh 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 60135e84d4d..fbf0c06996a 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt @@ -28,13 +28,13 @@ else() message(STATUS "NOTICE: Garland-Heckbert polices require the Eigen library, which has not been found; related examples will not be compiled.") endif() -find_package(OpenMesh QUIET) +find_package(OpenMesh CONFIG QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") create_single_source_cgal_program("edge_collapse_OpenMesh.cpp") - target_link_libraries(edge_collapse_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(edge_collapse_OpenMesh PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Examples that use OpenMesh 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 674ac89feff..6c50f2d1b8d 100644 --- a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt @@ -29,13 +29,13 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() - find_package(OpenMesh QUIET) + find_package(OpenMesh CONFIG QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_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 ${OPENMESH_LIBRARIES}) + target_link_libraries(MCF_Skeleton_om_example PUBLIC CGAL::Eigen3_support PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() From b5fc288336301f7b930ae892c6caf270a8236d12 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 27 Aug 2024 14:06:46 +0200 Subject: [PATCH 5/6] update Linear_cell_complex benchmark wrt OpenMesh --- .../Linear_cell_complex_2/CMakeLists.txt | 10 ++--- .../cmake/FindOpenMesh.cmake | 40 ------------------- 2 files changed, 4 insertions(+), 46 deletions(-) delete mode 100644 Linear_cell_complex/benchmark/Linear_cell_complex_2/cmake/FindOpenMesh.cmake 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 ce0dd87df2f..9c2ae7efb0c 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_2/CMakeLists.txt +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_2/CMakeLists.txt @@ -18,10 +18,8 @@ include_directories(BEFORE "/usr/include/libxml2/") # add_definitions("-g") # OpenMesh -set(OPENMESH_DIR "${CMAKE_CURRENT_SOURCE_DIR}/openmesh") -find_package(OpenMesh REQUIRED) -include_directories(${OPENMESH_INCLUDE_DIR}) -link_directories(${OPENMESH_LIBRARY_DIR}) +find_package(OpenMesh CONFIG REQUIRED) +include(CGAL_OpenMesh_support) # Polyhedron add_executable(polyhedron_performance performance_2.h polyhedron_performance.h @@ -42,7 +40,7 @@ target_link_libraries(surface_mesh_performance surface_mesh) # Open_mesh add_executable(openmesh_performance performance_2.h openmesh_performance.h openmesh_performance.cpp) -target_link_libraries(openmesh_performance ${OPENMESH_LIBRARIES}) +target_link_libraries(openmesh_performance CGAL::OpenMesh_support) # CGoGN find_package(Qt REQUIRED) @@ -91,4 +89,4 @@ target_link_libraries( Zinri z ${QT_LIBRARIES} - ${OPENMESH_LIBRARIES}) + CGAL::OpenMesh_support) diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_2/cmake/FindOpenMesh.cmake b/Linear_cell_complex/benchmark/Linear_cell_complex_2/cmake/FindOpenMesh.cmake deleted file mode 100644 index 98aefc13d23..00000000000 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_2/cmake/FindOpenMesh.cmake +++ /dev/null @@ -1,40 +0,0 @@ -# Find OpenMesh. If found, this will define -# -# OPENMESH_FOUND - Successfully found OpenMesh -# OPENMESH_INCLUDE_DIR - OpenMesh include directory -# OPENMESH_LIBRARIES - OpenMesh libraries -# OPENMESH_LIBRARY_DIR - OpenMesh library directory -# - -if(DEFINED OPENMESH_INCLUDE_DIR) - set(OPENMESH_FIND_QUIETLY TRUE) -else() - - find_path(OPENMESH_INCLUDE_DIR OpenMesh/Core/Mesh/PolyMeshT.hh - PATHS - /usr/local/include - /usr/include - $ENV{OPENMESH_DIR}/include - ${OPENMESH_DIR}/include - ) - - if(DEFINED OPENMESH_INCLUDE_DIR) - - message(STATUS "Found OpenMesh: " ${OPENMESH_INCLUDE_DIR}) - set(OPENMESH_FOUND true) - - if(WIN32) - set(OPENMESH_LIBRARY_DIR "${OPENMESH_INCLUDE_DIR}/../lib" - CACHE PATH "OpenMesh library directory") - else() - set(OPENMESH_LIBRARY_DIR "${OPENMESH_INCLUDE_DIR}/../lib/OpenMesh" - CACHE PATH "OpenMesh library directory") - endif() - - set(OPENMESH_LIBRARIES "OpenMeshCore;OpenMeshTools" - CACHE STRING "OpenMesh libraries") - - else() - set(OPENMESH_FOUND FALSE) - endif() -endif() From 4cf1f4b214be5a790f6719b2d2682e23de7aa92c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 4 Sep 2024 14:48:07 +0200 Subject: [PATCH 6/6] CONFIG options is only needed if a FindXXX.cmake exists --- BGL/examples/BGL_OpenMesh/CMakeLists.txt | 2 +- BGL/examples/BGL_polyhedron_3/CMakeLists.txt | 2 +- BGL/test/BGL/CMakeLists.txt | 2 +- Combinatorial_map/test/Combinatorial_map/CMakeLists.txt | 2 +- Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt | 2 +- .../benchmark/Linear_cell_complex_2/CMakeLists.txt | 2 +- .../examples/Polygon_mesh_processing/CMakeLists.txt | 2 +- .../test/Polygon_mesh_processing/CMakeLists.txt | 2 +- Property_map/test/Property_map/CMakeLists.txt | 2 +- STL_Extension/test/STL_Extension/CMakeLists.txt | 2 +- .../examples/Surface_mesh_deformation/CMakeLists.txt | 2 +- .../test/Surface_mesh_deformation/CMakeLists.txt | 2 +- .../examples/Surface_mesh_segmentation/CMakeLists.txt | 2 +- .../examples/Surface_mesh_shortest_path/CMakeLists.txt | 2 +- .../examples/Surface_mesh_simplification/CMakeLists.txt | 2 +- .../examples/Surface_mesh_skeletonization/CMakeLists.txt | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/BGL/examples/BGL_OpenMesh/CMakeLists.txt b/BGL/examples/BGL_OpenMesh/CMakeLists.txt index 36a1968b752..f461d55efb1 100644 --- a/BGL/examples/BGL_OpenMesh/CMakeLists.txt +++ b/BGL/examples/BGL_OpenMesh/CMakeLists.txt @@ -7,7 +7,7 @@ project(BGL_OpenMesh_Examples) # CGAL and its components find_package(CGAL REQUIRED) -find_package(OpenMesh CONFIG) +find_package(OpenMesh) if(OpenMesh_FOUND) include(CGAL_OpenMesh_support) create_single_source_cgal_program("TriMesh.cpp") diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index cd6f6827467..eabe0b1bd40 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -16,7 +16,7 @@ create_single_source_cgal_program("range.cpp") create_single_source_cgal_program("transform_iterator.cpp") create_single_source_cgal_program("copy_polyhedron.cpp") -find_package(OpenMesh CONFIG QUIET) +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(CGAL_OpenMesh_support) target_link_libraries(copy_polyhedron PRIVATE CGAL::OpenMesh_support) diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index 1f5bbb9ecd9..9594accd1fd 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -40,7 +40,7 @@ create_single_source_cgal_program("bench_read_from_stream_vs_add_face_and_add_fa create_single_source_cgal_program("graph_traits_inheritance.cpp" ) create_single_source_cgal_program("test_deprecated_io.cpp") -find_package(OpenMesh CONFIG QUIET) +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(CGAL_OpenMesh_support) diff --git a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt index 17d31b5fbcf..8df873f5de3 100644 --- a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt +++ b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt @@ -27,7 +27,7 @@ cgal_add_compilation_test(Combinatorial_map_copy_test_index) create_single_source_cgal_program(cmap_test_split_attribute.cpp) # Link with OpenMesh if possible -find_package(OpenMesh CONFIG QUIET) +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) message(STATUS "Found OpenMesh") include(CGAL_OpenMesh_support) diff --git a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt index 7a72a7c4caf..add02f31d30 100644 --- a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt @@ -19,7 +19,7 @@ create_single_source_cgal_program("quickhull_any_dim_3.cpp") create_single_source_cgal_program("extreme_points_3_sm.cpp") create_single_source_cgal_program("extreme_indices_3.cpp") -find_package(OpenMesh CONFIG QUIET) +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") 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 9c2ae7efb0c..986cd4f2fdb 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_2/CMakeLists.txt +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_2/CMakeLists.txt @@ -18,7 +18,7 @@ include_directories(BEFORE "/usr/include/libxml2/") # add_definitions("-g") # OpenMesh -find_package(OpenMesh CONFIG REQUIRED) +find_package(OpenMesh REQUIRED) include(CGAL_OpenMesh_support) # Polyhedron diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt index 911ea62ce07..69c6d25a52f 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt @@ -93,7 +93,7 @@ else() message(STATUS "NOTICE: Examples that use Eigen will not be compiled.") endif() -find_package(OpenMesh CONFIG QUIET) +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(CGAL_OpenMesh_support) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index 3d78756fba8..0ac926c0f30 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -112,7 +112,7 @@ else() message(STATUS "NOTICE: Intel TBB was not found. Tests will use sequential code.") endif() -find_package(OpenMesh CONFIG QUIET) +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(CGAL_OpenMesh_support) create_single_source_cgal_program("remeshing_test_P_SM_OM.cpp") diff --git a/Property_map/test/Property_map/CMakeLists.txt b/Property_map/test/Property_map/CMakeLists.txt index 78f43581afc..a51a39b66d0 100644 --- a/Property_map/test/Property_map/CMakeLists.txt +++ b/Property_map/test/Property_map/CMakeLists.txt @@ -10,7 +10,7 @@ create_single_source_cgal_program("dynamic_properties_test.cpp") create_single_source_cgal_program("kernel_converter_properties_test.cpp") create_single_source_cgal_program("test_Property_container.cpp") -find_package(OpenMesh CONFIG QUIET) +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) message(STATUS "Found OpenMesh") include(CGAL_OpenMesh_support) diff --git a/STL_Extension/test/STL_Extension/CMakeLists.txt b/STL_Extension/test/STL_Extension/CMakeLists.txt index 902664e75c8..781a6285d45 100644 --- a/STL_Extension/test/STL_Extension/CMakeLists.txt +++ b/STL_Extension/test/STL_Extension/CMakeLists.txt @@ -61,7 +61,7 @@ if(TARGET CGAL::TBB_support) target_link_libraries(test_for_each PUBLIC CGAL::TBB_support) endif() -find_package(OpenMesh CONFIG QUIET) +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) message(STATUS "Found OpenMesh") include(CGAL_OpenMesh_support) diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt index 0d93d45eda9..b6013ffce75 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt @@ -31,7 +31,7 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() - find_package(OpenMesh CONFIG QUIET) + find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt index b34653b68ec..e8819b7a22b 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt @@ -16,7 +16,7 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("Symmetry_test.cpp") target_link_libraries(Symmetry_test PUBLIC CGAL::Eigen3_support) - find_package(OpenMesh CONFIG QUIET) + find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") diff --git a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt index f944ad20b2f..e3f63874b1f 100644 --- a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt +++ b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt @@ -15,7 +15,7 @@ create_single_source_cgal_program("segmentation_from_sdf_values_SM_example.cpp") create_single_source_cgal_program("segmentation_from_sdf_values_LCC_example.cpp") create_single_source_cgal_program("extract_segmentation_into_mesh_example.cpp") -find_package(OpenMesh CONFIG QUIET) +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") diff --git a/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt b/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt index e605b7cbaf4..ba5a6455d26 100644 --- a/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt @@ -13,7 +13,7 @@ create_single_source_cgal_program("shortest_paths_with_id.cpp") create_single_source_cgal_program("shortest_paths.cpp") create_single_source_cgal_program("shortest_path_with_locate.cpp") -find_package(OpenMesh CONFIG QUIET) +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt index fbf0c06996a..0f63efb7b06 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt @@ -28,7 +28,7 @@ else() message(STATUS "NOTICE: Garland-Heckbert polices require the Eigen library, which has not been found; related examples will not be compiled.") endif() -find_package(OpenMesh CONFIG QUIET) +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") diff --git a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt index 6c50f2d1b8d..9b86386660b 100644 --- a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt @@ -29,7 +29,7 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() - find_package(OpenMesh CONFIG QUIET) + find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh")