summaryrefslogtreecommitdiff
path: root/dev-python/pynest2d/files/pynest2d-4.12.1-required-flags-from-Libnest2D-target.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pynest2d/files/pynest2d-4.12.1-required-flags-from-Libnest2D-target.patch')
-rw-r--r--dev-python/pynest2d/files/pynest2d-4.12.1-required-flags-from-Libnest2D-target.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/dev-python/pynest2d/files/pynest2d-4.12.1-required-flags-from-Libnest2D-target.patch b/dev-python/pynest2d/files/pynest2d-4.12.1-required-flags-from-Libnest2D-target.patch
new file mode 100644
index 000000000000..ff4482d197bf
--- /dev/null
+++ b/dev-python/pynest2d/files/pynest2d-4.12.1-required-flags-from-Libnest2D-target.patch
@@ -0,0 +1,23 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -21,11 +21,7 @@
+ endif()
+
+ find_package(SIP REQUIRED) # To create Python bindings.
+-find_package(libnest2d REQUIRED) # The library we're creating bindings for.
+-find_package(Clipper REQUIRED) # Dependency of libnest2d.
+-find_package(NLopt REQUIRED) # Dependency of libnest2d.
+-find_package(Boost REQUIRED) # Dependency of libnest2d.
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLIBNEST2D_GEOMETRIES_clipper -DLIBNEST2D_OPTIMIZERS_nlopt -DLIBNEST2D_THREADING_std") # Tell libnest2d to use Clipper and NLopt, and standard threads.
++find_package(Libnest2D REQUIRED) # The library we're creating bindings for.
+
+ # Some build options.
+ set(CMAKE_CXX_STANDARD 17)
+@@ -56,5 +52,5 @@
+ )
+
+ set(SIP_EXTRA_OPTIONS -g -n PyQt5.sip) # Always release the GIL before calling C++ methods. -n PyQt5.sip is required to not get the PyCapsule error
+-include_directories(src/ ${SIP_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS} ${CLIPPER_INCLUDE_DIRS} ${NLopt_INCLUDE_DIRS} ${LIBNEST2D_INCLUDE_DIRS})
+-add_sip_python_module(pynest2d src/Pynest2D.sip ${CLIPPER_LIBRARIES} ${NLopt_LIBRARIES})
++include_directories(src/ ${SIP_INCLUDE_DIRS})
++add_sip_python_module(pynest2d src/Pynest2D.sip Libnest2D::libnest2d_headeronly)