aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/imageprovider
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@qt.io>2021-07-19 21:40:14 +1000
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-07-20 08:37:49 +0000
commitd85171a41355b0e26355627db140fbee3fc541b2 (patch)
tree3d6c40380a9e9fcf4b2fcc5e52bee72d668f1d36 /examples/quick/imageprovider
parent6c524e3b9e84efa6c4faad5986146fd0870a3625 (diff)
CMake: Change the default of OUTPUT_DIRECTORY for qt6_add_qml_module()
The new default is now controlled via a new QT_QML_OUTPUT_DIRECTORY variable. If that isn't set, the fallback assumes the source directory structure follows the URI structure and uses ${CMAKE_CURRENT_BINARY_DIR} instead. This pattern means more projects will have working import paths for qmllint and possibly other tools out of the box. There should also be fewer cases where the OUTPUT_DIRECTORY option needs to be used in calls to qt6_add_qml_module(). The QT_QML_OUTPUT_DIRECTORY variable facilitates the scenario where QML modules might be distributed across different parts of the source directory hierarchy, but once collected under a common base point defined by QT_QML_OUTPUT_DIRECTORY, they form a coherent set of QML modules whose subdirectory structure below that base point follows their TARGET_PATH. Fixes: QTBUG-94164 Fixes: QTBUG-95081 Change-Id: I82864c361a2b34f7f1484cdbda0d9b64b34b9950 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 0c99c17761c89290d88e97367742122db5c9a46f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/quick/imageprovider')
-rw-r--r--examples/quick/imageprovider/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/quick/imageprovider/CMakeLists.txt b/examples/quick/imageprovider/CMakeLists.txt
index 5a25a45deb..82e1bd2a51 100644
--- a/examples/quick/imageprovider/CMakeLists.txt
+++ b/examples/quick/imageprovider/CMakeLists.txt
@@ -14,6 +14,7 @@ if(NOT DEFINED INSTALL_EXAMPLESDIR)
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/imageprovider/ImageProviderCore")
+set(QT_QML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/examples/quick/imageprovider)
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
@@ -21,7 +22,6 @@ find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
qt6_add_qml_module(qmlimageproviderplugin
- OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/ImageProviderCore"
VERSION 1.0
URI "ImageProviderCore"
PLUGIN_TARGET qmlimageproviderplugin