diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2017-01-31 13:10:53 +0100 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2017-02-03 15:39:36 +0000 |
commit | 0bbd1e3ca6ef166a28ff18afd946e0c20f6a31f9 (patch) | |
tree | 12ab1c7de5b799fe03b1c00c6ebbd687150283f4 /doc/src/qtquick | |
parent | e929cc59f5a7d0878b7acf3f723a2703711b71a1 (diff) |
Doc: Setting QML import path when using CMake
Change-Id: I7e29f86d2b429fadaad763fa6abe371f79669d75
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'doc/src/qtquick')
-rw-r--r-- | doc/src/qtquick/qtquick-modules-with-plugins.qdoc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/src/qtquick/qtquick-modules-with-plugins.qdoc b/doc/src/qtquick/qtquick-modules-with-plugins.qdoc index f336a6163d..be9d8ee5ed 100644 --- a/doc/src/qtquick/qtquick-modules-with-plugins.qdoc +++ b/doc/src/qtquick/qtquick-modules-with-plugins.qdoc @@ -60,6 +60,15 @@ then you can specify those using \c{QML_IMPORT_PATH} in the \c{.pro} file of your application. + If you use CMake, add the following command to the CMakeLists.txt file to + set the QML import path: + + \code + {set(QML_IMPORT_PATH ${CMAKE_SOURCE_DIR}/qml ${CMAKE_BINARY_DIR}/imports CACHE string "" FORCE)} + \endcode + + The import path affects all the targets built by the CMake project. + Ideally, QML modules have a \c{plugins.qmltypes} file in the same directory as the \c qmldir file. The \c qmltypes file contains a description of the types exported by the module's plugins and is loaded by \QC when the |