diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2019-08-13 16:46:28 +0200 |
---|---|---|
committer | Leander Beernaert <leander.beernaert@qt.io> | 2019-08-14 11:44:58 +0000 |
commit | 723d5c5056976dd30cab8e619a6b7ca06f7405e8 (patch) | |
tree | 39e190250580be408c2c600c77201fadbce973f9 /src/widgets/CMakeLists.txt | |
parent | b4bd6eaf927d576612b47db40647180123b73cb9 (diff) |
Fix QRC Resource paths for qrc files in subdirectories
When pro2cmake converts qrc files that are located in a subdirectory
there is an error in the resource paths for qrc files generated
with add_qt_resource().
For instance, consider the contents of data/scenegraph.qrc:
<RCC>
<qresource prefix="/qt-project.org/scenegraph">
<file>"shaders/24bittextmask.frag"</file>
</qrsource>
<RCC>
After processing by pro2cmake and add_qt_resource() we generate
<RCC>
<qresource prefix="/qt-project.org/scenegraph">
<file alias="data/shaders/24bittextmask.frag">
${CMAKE_CURRENT_SOURCE_DIR}/data/shaders/24bittextmask.frag"
</file>
</qrsource>
<RCC>
The expected qrc path for the resource should be prefix/shaders/...,
but in CMake it becomes prefix/data/shaders/... due to the
BASE parameter.
To fix it we check whether BASE is set and whether there are no
other aliases present on the source file before setting an alias
with the original file path.
Change-Id: If0a68a5ffa787704b10b740e20f875c9029509b0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/widgets/CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions