diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-05-14 15:31:30 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-05-18 19:11:38 +0000 |
commit | 78a192e58d208680f10d397b275a5b571b600749 (patch) | |
tree | 0faab14f106c2a0c45047f76a2e43ad95c8f5560 /CMakeLists.txt | |
parent | fb9d138e5369c0585cc658583a60539002057ec6 (diff) |
Fix BASE argument of qt_add_resources
The BASE argument of qt_add_resources now denotes the root point of the
alias of the file. Before, BASE was merely prepended to every file that
got passed to qt_add_resources.
Old behavior:
qt_add_resources(app "images"
PREFIX "/"
BASE "../shared"
FILES "images/button.png")
Alias is "../shared/images/button.png", and pro2cmake generated
QT_RESOURCE_ALIAS assignments to fix this.
New behavior:
qt_add_resources(app "images"
PREFIX "/"
BASE "../shared"
FILES "../shared/images/button.png")
The alias is "images/button.png". No extra QT_RESOURCE_ALIAS assignment
is needed.
The new behavior is in effect for user projects and for Qt repositories
that define QT_USE_FIXED_QT_ADD_RESOURCE_BASE. Qt repositories will be
ported one by one to this new behavior. Then the old code path can be
removed.
Task-number: QTBUG-86726
Change-Id: Ib895edd4df8e97b54badadd9a1c34408beff131f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 92185d417de43237ae62eae55599c65922cd9a15)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ea40913cd..230b593711 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,9 @@ project(QtBase # Make sure we only use latest private CMake API, aka no compatibility wrappers. set(QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS TRUE) +# Make sure we use the fixed BASE argument of qt_add_resource. +set(QT_USE_FIXED_QT_ADD_RESOURCE_BASE TRUE) + if(NOT QT_BUILD_STANDALONE_TESTS) ## Add some paths to check for cmake modules: list(PREPEND CMAKE_MODULE_PATH |