cmake scripts: when writing resources, replace OUT_PWD
Needed in tests/auto/corelib/plugin/qfactoryloader/test/ for example. Change-Id: I5a2904e25d2895355fe11d4fc3e2e7c742346e42 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
4691b4fbae
commit
3a9bca6574
@ -1620,6 +1620,7 @@ _path_replacements = {
|
||||
"$$[QT_INSTALL_PREFIX]": "${INSTALL_DIRECTORY}",
|
||||
"$$[QT_INSTALL_EXAMPLES]": "${INSTALL_EXAMPLESDIR}",
|
||||
"$$[QT_INSTALL_TESTS]": "${INSTALL_TESTSDIR}",
|
||||
"$$OUT_PWD": "${CMAKE_CURRENT_BINARY_DIR}",
|
||||
}
|
||||
|
||||
def replace_path_constants(path: str, scope: Scope) -> str:
|
||||
@ -2231,7 +2232,7 @@ def write_resources(cm_fh: IO[str], target: str, scope: Scope, indent: int = 0,
|
||||
immediate_prefix = "/"
|
||||
immediate_base_list = scope.get(f"{r}.base")
|
||||
assert len(immediate_base_list) < 2, f"immediate base directory must be at most one entry"
|
||||
immediate_base = "".join(immediate_base_list)
|
||||
immediate_base = replace_path_constants("".join(immediate_base_list), scope)
|
||||
immediate_lang = None
|
||||
immediate_name = f"qmake_{r}"
|
||||
qrc_output += write_add_qt_resource_call(
|
||||
|
Loading…
Reference in New Issue
Block a user