blob: ebd9fc2e714494fceb538682aa986dc0f6564646 (
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
|
--- pyside-setup-opensource-src-5.15.16/sources/shiboken2/data/shiboken_helpers.cmake 2024-11-11 08:14:27.000000000 -0500
+++ pyside-setup-opensource-src-5.15.16/sources/shiboken2/data/shiboken_helpers.cmake.patch 2025-03-30 16:29:05.997004168 -0400
@@ -315,14 +315,24 @@
macro(shiboken_find_required_python)
if(${ARGC} GREATER 0)
- find_package(PythonInterp ${ARGV0} REQUIRED)
- find_package(PythonLibs ${ARGV0} REQUIRED)
+ find_package(Python ${ARGV0} REQUIRED COMPONENTS Interpreter Development)
+ set(PYTHONINTERP_FOUND ${Python_Interpreter_FOUND})
+ set(PYTHONLIBS_FOUND ${Python_Development_FOUND})
+ set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
+ set(PYTHON_INCLUDE_DIRS ${Python_INCLUDE_DIRS})
+ set(PYTHON_LIBRARIES ${Python_LIBRARIES})
+ set(PYTHON_VERSION "${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}")
else()
# If no version is specified, just use any interpreter that can be found (from PATH).
# This is useful for super-project builds, so that the default system interpeter
# gets picked up (e.g. /usr/bin/python and not /usr/bin/python2.7).
- find_package(PythonInterp REQUIRED)
- find_package(PythonLibs REQUIRED)
+ find_package(Python REQUIRED COMPONENTS Interpreter Development)
+ set(PYTHONINTERP_FOUND ${Python_Interpreter_FOUND})
+ set(PYTHONLIBS_FOUND ${Python_Development_FOUND})
+ set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
+ set(PYTHON_INCLUDE_DIRS ${Python_INCLUDE_DIRS})
+ set(PYTHON_LIBRARIES ${Python_LIBRARIES})
+ set(PYTHON_VERSION "${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}")
endif()
shiboken_validate_python_version()
|