summaryrefslogtreecommitdiffstats
path: root/cmake/QtProperties.cmake
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-08-09 11:42:37 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-08-09 11:47:25 +0000
commit73ba2ba2def56b9eba852b1f7e884925e713535d (patch)
tree1115a36332d094c2f56fec918f291efa376dfce9 /cmake/QtProperties.cmake
parentf55c6a4cb082a6dbd6e65a0696a998478febde27 (diff)
Simplify resource embedding for qml modules
* Add support for a QT_RESOURCE_PREFIX target property, that add_qt_resource respects. This makes it convenient to add files to the resource system for a project without the need to repeat prefixes. In qmake land with multiple resources they're repeated in the foo.prefix variables or in the prefix attribute in .qrc files. * Since /qt-project.org/imports is in the default QML import search path and the hierarchy under the import search paths is "regulated", we might as well make add_qml_module set QT_RESOURCE_PREFIX on the target. We can compute the correct value for that. This allows removing the redundant prefix from the add_qt_resource() calls for the qml files. Change-Id: Ic15130dc9e432340fc3edf93e35f2a803b4b40eb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
Diffstat (limited to 'cmake/QtProperties.cmake')
-rw-r--r--cmake/QtProperties.cmake7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmake/QtProperties.cmake b/cmake/QtProperties.cmake
index 5cc8ca7b11..43a7393cdf 100644
--- a/cmake/QtProperties.cmake
+++ b/cmake/QtProperties.cmake
@@ -79,11 +79,12 @@ define_property(TARGET
define_property(TARGET
PROPERTY
- QT_QML_MODULE_RESOURCE_PREFIX
+ QT_RESOURCE_PREFIX
BRIEF_DOCS
- "Specifies the qml module's resource prefix."
+ "Specifies the default Qt resource prefix."
FULL_DOCS
- "Specifies the qml module's resource prefix."
+ "When using add_qt_resource() without a PREFIX, then prefix of this target property
+ will be used."
)
define_property(TARGET