From 63d2a26c00d79ead0a370e82588e190a2b5cf7a6 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Oct 2024 13:21:51 +0100 Subject: [PATCH] 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 61060474db9..9be4f7fdad1 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 8b3ccbf3da3..aa5d323ba53 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 dabd10ef527..ab5190aac74 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 bc7a8944cb7..dcb7518f288 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()