summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@qt.io>2019-10-04 16:47:56 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2019-10-07 08:57:58 +0000
commit123ef6c391209b84a245abb536117b1f6a04a860 (patch)
treed403a57a7ccae20bf16be8c8a6328faaac568644 /util
parent7bca6edc1679813e353e386235c8f88e5af622fd (diff)
CMake: allow $$[QT_INSTALL_PREFIX]
This is used in QtPurchasing. Change-Id: I29c3a87d844eeaf3fd1b64057e33d64054f14a89 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'util')
-rwxr-xr-xutil/cmake/pro2cmake.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index 3fce84b34d..d32014a8c5 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -2627,6 +2627,7 @@ def write_main_part(
if destdir:
if destdir.startswith("./") or destdir.startswith("../"):
destdir = f"${{CMAKE_CURRENT_BINARY_DIR}}/{destdir}"
+ destdir = destdir.replace("$$[QT_INSTALL_PREFIX]", "${INSTALL_DIRECTORY}")
extra_lines.append(f'OUTPUT_DIRECTORY "{destdir}"')
cm_fh.write(f"{spaces(indent)}{cmake_function}({name}\n")
@@ -2795,6 +2796,7 @@ def write_binary(cm_fh: IO[str], scope: Scope, gui: bool = False, *, indent: int
target_path = scope.get_string("target.path")
if target_path:
+ target_path = target_path.replace("$$[QT_INSTALL_PREFIX]", "${INSTALL_DIRECTORY}")
target_path = target_path.replace("$$[QT_INSTALL_EXAMPLES]", "${INSTALL_EXAMPLESDIR}")
target_path = target_path.replace("$$[QT_INSTALL_TESTS]", "${INSTALL_TESTSDIR}")
target_path = target_path.replace("$$TARGET", scope.TARGET)