From: Sebastien Loriot Date: Mon, 30 Dec 2024 18:21:18 +0000 (+0100) Subject: Fix build issue with CGAL 6.0 X-Git-Tag: archive/raspbian/0.10.6-5+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f9161e1570b6da9e1837def84b12e1da7f7b6299;p=pygalmesh.git Fix build issue with CGAL 6.0 Origin, upstream: https://github.com/meshpro/pygalmesh/pull/214 Bug-Debian: https://bugs.debian.org/1074381 Last-Update: 2024-11-16 Origin, upstream: https://github.com/meshpro/pygalmesh/pull/214 Bug-Debian: https://bugs.debian.org/1074381 Last-Update: 2024-11-16 Gbp-Pq: Name build-with-CGAL-6.0.patch --- 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) ||