aboutsummaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-07-29 14:30:12 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-07-29 13:15:29 +0000
commite6ed3f67eee166dccdedf645d9871bfdc21d57de (patch)
treebf357fafaa9531f1a387626dcab467ec35f9327a /src/CMakeLists.txt
parent23b846b8a68a0dc344c8c2d7d0e23a696420dba0 (diff)
Allow the use of qmlcachegen inside src
Make the qmlcachegen target visible in src. This will allow the use of compiling .qml files such as src/imports/testlib/*.qml ahead of time. We might move the sources over from tools/ in the future, but for cmake this isn't necessary -- as long as the targets are defined. Change-Id: I0755c6cb5c78fcb144c067d2b50092e42bb6f65a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index df2a0b0ae1..f3b6f296c1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -29,12 +29,18 @@ endif()
# These need to be included here since they have dependencies on the modules
# specified above.
add_subdirectory(plugins)
-add_subdirectory(imports)
if(QT_FEATURE_qml_devtools)
add_subdirectory(qmldevtools)
+
+ # Build qmlcachegen now, so that we can use it in src/imports.
+ if(QT_FEATURE_commandlineparser AND QT_FEATURE_xmlstreamwriter)
+ add_subdirectory(../tools/qmlcachegen qmlcachegen)
+ endif()
endif()
+add_subdirectory(imports)
+
if(QT_FEATURE_qml_network)
if(QT_FEATURE_thread AND QT_FEATURE_localserver AND QT_FEATURE_qml_debug)