aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--tools/CMakeLists.txt6
2 files changed, 9 insertions, 5 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)
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index d7efb8285c..521246c026 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -5,10 +5,8 @@ if(QT_FEATURE_qml_devtools)
add_subdirectory(qmllint)
add_subdirectory(qmlmin)
add_subdirectory(qmlimportscanner)
-
- if(QT_FEATURE_commandlineparser AND QT_FEATURE_xmlstreamwriter)
- add_subdirectory(qmlcachegen)
- endif()
+ # special case: Do not build qmlcachegen here but build it at src/
+ # time, so that we can use it for our own .qml files in src/imports.
endif()
if(QT_FEATURE_thread AND NOT ANDROID OR android_app AND NOT WASM AND NOT rtems)