diff options
author | Dominik Holland <dominik.holland@qt.io> | 2022-02-23 11:16:31 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-02-23 20:29:59 +0000 |
commit | 1c4e19a5a88d728e8553cacd79463b31e3f090a5 (patch) | |
tree | 37bb84f0e7c32a90500d66e281a8359099300e83 /examples/interfaceframework/qface-climate/demo | |
parent | 835cb446025c163b2cc751f2a18d06c489ee22c8 (diff) |
Add QML_IMPORT_PATH logic to the ifcodegen examples
Similar to the qmake version, we also set the QML_IMPORT_PATH to the
generated directories, in order to use the autogenerated qmltypes.
Change-Id: I521dc021d098b047f6b3bf3a513793386c614675
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
(cherry picked from commit 7524c822be4712bcfec509a8194a9d037e36a4f4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/interfaceframework/qface-climate/demo')
-rw-r--r-- | examples/interfaceframework/qface-climate/demo/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/interfaceframework/qface-climate/demo/CMakeLists.txt b/examples/interfaceframework/qface-climate/demo/CMakeLists.txt index 6ab116b6..a29940e0 100644 --- a/examples/interfaceframework/qface-climate/demo/CMakeLists.txt +++ b/examples/interfaceframework/qface-climate/demo/CMakeLists.txt @@ -38,6 +38,12 @@ target_link_libraries(qface-climate PUBLIC Qt::Quick ) +set(import_path "${CMAKE_CURRENT_BINARY_DIR}/frontend/qml") +if (NOT ${import_path} IN_LIST QML_IMPORT_PATH) + list (APPEND QML_IMPORT_PATH "${import_path}") + set(QML_IMPORT_PATH ${QML_IMPORT_PATH} CACHE INTERNAL "" FORCE) +endif() + # Resources: set(qml_resource_files |