From 123ef6c391209b84a245abb536117b1f6a04a860 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 4 Oct 2019 16:47:56 +0200 Subject: [PATCH] CMake: allow $$[QT_INSTALL_PREFIX] This is used in QtPurchasing. Change-Id: I29c3a87d844eeaf3fd1b64057e33d64054f14a89 Reviewed-by: Simon Hausmann --- util/cmake/pro2cmake.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 3fce84b34da..d32014a8c5b 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)