From 5e4afd3421e44cb5f7cc3839b2769091e92f3c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 22 Jul 2024 11:25:57 +0200 Subject: [PATCH] compatibility with CGAL 6.0 --- src/CMakeLists.txt | 3 +-- src/generate.cpp | 2 +- src/generate_from_inr.cpp | 2 +- src/generate_from_off.cpp | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d214588..fbd597d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,7 +5,6 @@ FIND_PACKAGE(Eigen3 REQUIRED) include_directories(${EIGEN3_INCLUDE_DIR}) FIND_PACKAGE(CGAL REQUIRED) -include(${CGAL_USE_FILE}) FILE(GLOB pygalmesh_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") # FILE(GLOB pygalmesh_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") @@ -13,7 +12,7 @@ FILE(GLOB pygalmesh_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") pybind11_add_module(pygalmesh ${pygalmesh_SRCS}) # ADD_LIBRARY(pygalmesh ${pygalmesh_SRCS}) -target_link_libraries(pygalmesh PRIVATE ${CGAL_LIBRARIES}) +target_link_libraries(pygalmesh PRIVATE CGAL::CGAL) # https://github.com/CGAL/cgal/issues/6002 # find_program(iwyu_path NAMES include-what-you-use iwyu REQUIRED) diff --git a/src/generate.cpp b/src/generate.cpp index 64b0ba5..baef052 100644 --- a/src/generate.cpp +++ b/src/generate.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/src/generate_from_inr.cpp b/src/generate_from_inr.cpp index 1d63fe6..a01e4c9 100644 --- a/src/generate_from_inr.cpp +++ b/src/generate_from_inr.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/src/generate_from_off.cpp b/src/generate_from_off.cpp index fcebef5..c0a1abf 100644 --- a/src/generate_from_off.cpp +++ b/src/generate_from_off.cpp @@ -18,7 +18,7 @@ #include -#if CGAL_VERSION_MAJOR >= 5 && CGAL_VERSION_MINOR < 3 +#if (CGAL_VERSION_MAJOR == 5 && CGAL_VERSION_MINOR < 3) #include #endif @@ -78,7 +78,7 @@ void generate_from_off( if( !input || -#if CGAL_VERSION_MAJOR >= 5 && CGAL_VERSION_MINOR >= 3 +#if (CGAL_VERSION_MAJOR >= 5 && CGAL_VERSION_MINOR >= 3) || (CGAL_VERSION_MAJOR >= 6) !CGAL::IO::read_OFF(input, points, polygons) || #else !CGAL::read_OFF(input, points, polygons) ||