summaryrefslogtreecommitdiff
path: root/media-gfx/openvdb/files/openvdb-9.0.0-unconditionally-search-Python-interpreter.patch
blob: 1a24f4c535c336be823d9e41059ebbfb6dcbc41d (plain)
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
https://bugs.gentoo.org/790350
https://github.com/AcademySoftwareFoundation/openvdb/pull/1275

From 86cbe16b5f8bf9df2c3825d7d7d90c58bc0d3391 Mon Sep 17 00:00:00 2001
From: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
Date: Wed, 8 Dec 2021 16:57:58 +0000
Subject: [PATCH] Fixed an issue with find_python and cmake 3.18

Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
---
 openvdb/openvdb/python/CMakeLists.txt | 10 +++++++++-
 pendingchanges/cmake_python.txt       |  2 ++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/openvdb/openvdb/python/CMakeLists.txt b/openvdb/openvdb/python/CMakeLists.txt
index 2821efb5d..179c0c57d 100644
--- a/openvdb/openvdb/python/CMakeLists.txt
+++ b/openvdb/openvdb/python/CMakeLists.txt
@@ -97,7 +97,15 @@ endfunction()
 #   target but this was only added in CMake 3.15. See:
 #      https://github.com/AcademySoftwareFoundation/openvdb/issues/886
 set(OPENVDB_PYTHON_DEPS)
-set(OPENVDB_PYTHON_REQUIRED_COMPONENTS Development)
+
+# @note  explicitly only search for Development.Module from 3.18 as searching
+#   Development.Embed can cause issues on linux systems where it doesn't exist
+if(${CMAKE_VERSION} VERSION_LESS 3.18)
+  set(OPENVDB_PYTHON_REQUIRED_COMPONENTS Development)
+else()
+  set(OPENVDB_PYTHON_REQUIRED_COMPONENTS Development.Module)
+endif()
+
 if(NOT DEFINED PYOPENVDB_INSTALL_DIRECTORY)
   list(APPEND OPENVDB_PYTHON_REQUIRED_COMPONENTS Interpreter)
 endif()