Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.2.1
-
None
Description
i'm trying to use `qt_add_qml_module` in my current project.
my directory layout looks like this:
CMakeLists.txt inc/foo.h src/foo.cpp resources/qt/Main.qml resources/qt/component1/Comp1.qml resources/qt/component1/Asset1.png resources/qt/component2/Comp2.qml resources/qt/component2/Asset2.png resources/qt/component3/Comp3.qml resources/qt/component3/Asset3.png
i'm using `qt_add_qml_module` like this:
qt_add_qml_module( FooCore URI FooCore VERSION 1.0 PLUGIN_TARGET FooPlugin OUTPUT_DIRECTORY FooCore QML_FILES resources/qt/Main.qml resources/qt/component1/Comp1.qml resources/qt/component2/Comp2.qml resources/qt/component3/Comp3.qml RESOURCES resources/qt/component1/Asset1.png resources/qt/component2/Asset2.png resources/qt/component3/Asset3.png )
this leads to a generated qrc file with a resource prefix "/FooCore/", which is great. but all resources and qml files use an "alias" with the full specified path. (e.g. "resources/qt/component1/Comp1.qml"). i wonder if it makes sense to add a keyword argument to specify a "base dir". something like `RESOURCE_BASE_DIR resources/qt` would lead to qrc "alias"es like "Main.qml", "component1/Comp1.qml" etc ... or maybe there is another way to allow better control over the qrc path of specific resources ...
Attachments
Issue Links
- relates to
-
QTBUG-130791 qt_target_qml_sources cannot be subdir of qt_add_qml_module
-
- Closed
-