aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/utils.py
diff options
context:
space:
mode:
authorShyamnath Premnadh <[email protected]>2025-05-16 11:27:56 +0200
committerShyamnath Premnadh <[email protected]>2025-06-11 09:06:16 +0200
commit93baaa8c98d7bd6e170e894b1854c99585d58b20 (patch)
tree2faf9fbc1a89e069cdcef4fd1b16c2425545e195 /build_scripts/utils.py
parent135c10324b1533f23f34a043963ce49b324c16c0 (diff)
PySide: Move CMake config packages into wheelsHEADdev
- This becomes useful for QtBridges to access cmake variables related to PySide6 and shibken6 installation. Change-Id: I260282b56af0709c49c3e30c16aa950ce5c1653f Reviewed-by: Friedemann Kleint <[email protected]>
Diffstat (limited to 'build_scripts/utils.py')
-rw-r--r--build_scripts/utils.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/build_scripts/utils.py b/build_scripts/utils.py
index 29f2545d0..be132bad8 100644
--- a/build_scripts/utils.py
+++ b/build_scripts/utils.py
@@ -1136,3 +1136,19 @@ def parse_modules(modules: str) -> str:
module_sub_set += ';'
module_sub_set += m
return module_sub_set
+
+
+def copy_cmake_config_dirs(install_dir, st_build_dir, st_package_name, cmake_package_name):
+ """
+ Copy all CMake config directories from <install_dir>/lib/cmake whose names start with
+ <cmake_package_name> (case-insensitive) into <st_build_dir>/<st_package_name>/lib/cmake.
+ """
+ src_cmake_dir = Path(install_dir) / "lib" / "cmake"
+ dst_cmake_dir = Path(st_build_dir) / st_package_name / "lib" / "cmake"
+ dst_cmake_dir.mkdir(parents=True, exist_ok=True)
+ for src_path in src_cmake_dir.iterdir():
+ if src_path.is_dir() and src_path.name.lower().startswith(cmake_package_name.lower()):
+ dst_path = dst_cmake_dir / src_path.name
+ if dst_path.exists():
+ shutil.rmtree(dst_path)
+ shutil.copytree(src_path, dst_path)