diff --git a/CGAL_ImageIO/include/CGAL/SEP_to_ImageIO.h b/CGAL_ImageIO/include/CGAL/SEP_to_ImageIO.h index 97bd4502006..54ed43b9814 100644 --- a/CGAL_ImageIO/include/CGAL/SEP_to_ImageIO.h +++ b/CGAL_ImageIO/include/CGAL/SEP_to_ImageIO.h @@ -20,13 +20,7 @@ #include #include -#include -#include - -#ifndef BOOST_FILESYSTEM_VERSION -// That macro was not defined in previous releases of Boost. -# define BOOST_FILESYSTEM_VERSION 2 -#endif +#include #include @@ -60,15 +54,9 @@ public: } display_information(fileName, std::cout); - boost::filesystem::path headerFile(fileName); - boost::filesystem::path dataFile(string_field("in")); -#if BOOST_FILESYSTEM_VERSION == 2 - dataFile = boost::filesystem::complete(dataFile, - boost::filesystem::complete(headerFile.parent_path())); -#else - dataFile = boost::filesystem::absolute(dataFile, - boost::filesystem::absolute(headerFile.parent_path())); -#endif + std::filesystem::path headerFile(fileName); + std::filesystem::path dataFile = std::filesystem::absolute(fileName).parent_path() / std::filesystem::path(string_field("in")); + if(!load_data(dataFile.string())) { return; err_msg = "Invalid data file \""; diff --git a/Installation/cmake/modules/CGAL_pointmatcher_support.cmake b/Installation/cmake/modules/CGAL_pointmatcher_support.cmake index 16650ba6d9c..a4f823cdddc 100644 --- a/Installation/cmake/modules/CGAL_pointmatcher_support.cmake +++ b/Installation/cmake/modules/CGAL_pointmatcher_support.cmake @@ -1,16 +1,15 @@ if(libpointmatcher_FOUND AND NOT TARGET CGAL::pointmatcher_support) if (libpointmatcher_VERSION VERSION_GREATER_EQUAL "1.4.4") - find_package(Boost COMPONENTS thread system program_options date_time chrono) + find_package(Boost COMPONENTS thread program_options date_time chrono) else() find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono) endif() if(Boost_chrono_FOUND AND Boost_thread_FOUND - AND Boost_system_FOUND AND Boost_program_options_FOUND AND Boost_date_time_FOUND - AND (libpointmatcher_VERSION VERSION_GREATER_EQUAL "1.4.4" OR Boost_filesystem_FOUND)) + AND (libpointmatcher_VERSION VERSION_GREATER_EQUAL "1.4.4" OR (Boost_filesystem_FOUND AND Boost_system_FOUND))) add_library(CGAL::pointmatcher_support INTERFACE IMPORTED) target_compile_options(CGAL::pointmatcher_support INTERFACE "-D_USE_MATH_DEFINES") target_compile_definitions(CGAL::pointmatcher_support INTERFACE "CGAL_LINKED_WITH_POINTMATCHER") @@ -18,7 +17,7 @@ if(libpointmatcher_FOUND AND NOT TARGET CGAL::pointmatcher_support) target_link_libraries(CGAL::pointmatcher_support INTERFACE ${libpointmatcher_LIBRARIES} libnabo::nabo) else() if (libpointmatcher_VERSION VERSION_GREATER_EQUAL "1.4.4") - message(STATUS "NOTICE: the libpointmatcher library requires the following boost components: thread system program_options date_time chrono.") + message(STATUS "NOTICE: the libpointmatcher library requires the following boost components: thread program_options date_time chrono.") else() message(STATUS "NOTICE: the libpointmatcher library requires the following boost components: thread filesystem system program_options date_time chrono.") endif() diff --git a/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt b/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt index dda7d3fac53..c950047d0f0 100644 --- a/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt @@ -48,8 +48,7 @@ else() message(STATUS "NOTICE: DICOM files (.dcm) require the VTK libraries, and will not be readable.") endif() -find_package(Boost QUIET OPTIONAL_COMPONENTS filesystem system) -if(Boost_FILESYSTEM_FOUND AND Boost_SYSTEM_FOUND) + qt6_wrap_ui( imgUI_FILES Image_res_dialog.ui raw_image.ui) cgal_lab_plugin(io_image_plugin Io_image_plugin Volume_plane_intersection.cpp @@ -62,11 +61,7 @@ if(Boost_FILESYSTEM_FOUND AND Boost_SYSTEM_FOUND) target_compile_definitions(io_image_plugin PRIVATE -DCGAL_USE_VTK -DNOMINMAX) endif() - target_link_libraries(io_image_plugin PRIVATE Boost::filesystem Boost::system) -else() - message(STATUS "NOTICE: the Io_image_plugin requires boost-filesystem, and will not be compiled") -endif() cgal_lab_plugin( mesh_3_optimization_plugin Optimization_plugin diff --git a/Lab/demo/Lab/Plugins/Mesh_3/Io_image_plugin.cpp b/Lab/demo/Lab/Plugins/Mesh_3/Io_image_plugin.cpp index 780511846aa..a4302b32708 100644 --- a/Lab/demo/Lab/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Lab/demo/Lab/Plugins/Mesh_3/Io_image_plugin.cpp @@ -72,7 +72,7 @@ #include #include -#include +#include #include #include @@ -1520,10 +1520,10 @@ Image* Io_image_plugin::createDirectoryImage(const QString& dirname, CGAL_assertion(ext == Directory_extension_type::BMP); // vtkBMPReader does not provide SetDirectoryName()... - std::vector paths; + std::vector paths; vtkStringArray* files = vtkStringArray::New(); - boost::filesystem::path p(dirname.toUtf8().data()); - for(boost::filesystem::directory_entry& x : boost::filesystem::directory_iterator(p)) + std::filesystem::path p(dirname.toUtf8().data()); + for(const std::filesystem::directory_entry& x : std::filesystem::directory_iterator(p)) { std::string s = x.path().string(); if(CGAL::IO::internal::get_file_extension(s) != "bmp") @@ -1532,10 +1532,10 @@ Image* Io_image_plugin::createDirectoryImage(const QString& dirname, paths.push_back(x.path()); } - // boost::filesystem::directory_iterator does not guarantee a sorted order + // std::filesystem::directory_iterator does not guarantee a sorted order std::sort(std::begin(paths), std::end(paths)); - for(const boost::filesystem::path& p : paths) + for(const std::filesystem::path& p : paths) files->InsertNextValue(p.string()); if(files->GetSize() == 0)