aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2022-02-09 14:14:01 +0100
committerEike Ziller <eike.ziller@qt.io>2022-02-09 13:18:49 +0000
commitaac0e8ef6ecca8979cd753b2aaa86301ef2d4bbb (patch)
tree07e0609fc902c264e08b1a96b02fb282a01ecd8b
parentcdeb3ae13f1f06a9cb19b977f8c4bc96adf65126 (diff)
Fix finding python development package for cdb extension
Amends e9f3f8cc641a773078ca17c5110587d5c3b717f7 We switched to find_package(Python3 ...) and that doesn't use PYTHON_LIBRARY and PYTHON_INCLUDE_DIR. Simply provide the root path for find_package(Python3 ...). Change-Id: If862151c095af358be5f35d3d8002d77dcd17aa6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rwxr-xr-xscripts/build.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/build.py b/scripts/build.py
index 9b1a46c1c4..2f33b95ff5 100755
--- a/scripts/build.py
+++ b/scripts/build.py
@@ -126,8 +126,9 @@ def common_cmake_arguments(args):
'-G', 'Ninja']
if args.python3:
- cmake_args += ['-DPYTHON_EXECUTABLE=' + args.python3]
cmake_args += ['-DPython3_EXECUTABLE=' + args.python3]
+ if args.python_path:
+ cmake_args += ['-DPython3_ROOT_DIR=' + args.python_path]
if args.module_paths:
module_paths = [common.to_posix_path(os.path.abspath(fp)) for fp in args.module_paths]
@@ -140,11 +141,6 @@ def common_cmake_arguments(args):
if not os.environ.get('CC') and not os.environ.get('CXX'):
cmake_args += ['-DCMAKE_C_COMPILER=cl',
'-DCMAKE_CXX_COMPILER=cl']
- if args.python_path:
- python_library = glob.glob(os.path.join(args.python_path, 'libs', 'python??.lib'))
- if python_library:
- cmake_args += ['-DPYTHON_LIBRARY=' + python_library[0],
- '-DPYTHON_INCLUDE_DIR=' + os.path.join(args.python_path, 'include')]
pch_option = 'ON' if args.with_pch else 'OFF'
cmake_args += ['-DBUILD_WITH_PCH=' + pch_option]