File: build-with-CGAL-6.0.patch

package info (click to toggle)
pygalmesh 0.10.6-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 632 kB
  • sloc: cpp: 2,306; python: 1,541; makefile: 25
file content (73 lines) | stat: -rw-r--r-- 2,312 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Description: Fix build issue with CGAL 6.0 
Author: Sebastien Loriot <sebastien.loriot@cgal.org>
Origin, upstream: https://github.com/meshpro/pygalmesh/pull/214
Bug-Debian: https://bugs.debian.org/1074381
Last-Update: 2024-11-16
---
 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(-)

--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -5,7 +5,6 @@
 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 @@
 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)
--- a/src/generate.cpp
+++ b/src/generate.cpp
@@ -8,7 +8,7 @@
 #include <CGAL/Mesh_complex_3_in_triangulation_3.h>
 #include <CGAL/Mesh_criteria_3.h>
 
-#include <CGAL/Implicit_mesh_domain_3.h>
+#include <CGAL/Labeled_mesh_domain_3.h>
 #include <CGAL/Mesh_domain_with_polyline_features_3.h>
 #include <CGAL/make_mesh_3.h>
 
--- a/src/generate_from_inr.cpp
+++ b/src/generate_from_inr.cpp
@@ -11,7 +11,7 @@
 #include <CGAL/Mesh_complex_3_in_triangulation_3.h>
 #include <CGAL/Mesh_criteria_3.h>
 
-#include <CGAL/Implicit_mesh_domain_3.h>
+#include <CGAL/Labeled_mesh_domain_3.h>
 #include <CGAL/Mesh_domain_with_polyline_features_3.h>
 #include <CGAL/make_mesh_3.h>
 
--- a/src/generate_from_off.cpp
+++ b/src/generate_from_off.cpp
@@ -18,7 +18,7 @@
 
 #include <CGAL/version_macros.h>
 
-#if CGAL_VERSION_MAJOR >= 5 && CGAL_VERSION_MINOR < 3
+#if (CGAL_VERSION_MAJOR == 5 && CGAL_VERSION_MINOR < 3)
   #include <CGAL/IO/OFF_reader.h>
 #endif
 
@@ -78,7 +78,7 @@
 
     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) ||