summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals.cid@kdab.com>2019-01-29 17:49:04 +0100
committerAlbert Astals Cid <albert.astals.cid@kdab.com>2019-02-07 09:12:55 +0000
commitbb0deccf19116735db3724734b79b89d8dbdf2e3 (patch)
treec86c974ad912f169b1bd6429112a39929e6e1896 /src
parent6d51f69bbf3d88f7da46586a01c26034850ce897 (diff)
cmake: Make sure moc/rcc/uic are built when needed
This way you can run cmake, go directly into src/widgets and it will build moc and rcc before QtCore (because they are needed there) and uic before QtWidgets but not before QtCore because it's not used there. Without this it would get stuck creating the mocs since cmake is not expecting the moc executable to just not be there Change-Id: Ibcb6057bfab7a4bf823544e8f7bd128ea93d1986 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/CMakeLists.txt3
-rw-r--r--src/widgets/CMakeLists.txt2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt
index 2ade76d2f5..7e1a788e22 100644
--- a/src/corelib/CMakeLists.txt
+++ b/src/corelib/CMakeLists.txt
@@ -239,6 +239,9 @@ add_qt_module(Core
QT_NO_FOREACH
)
+add_dependencies(Core Qt::moc)
+add_dependencies(Core Qt::rcc)
+
configure_file(global/qconfig.cpp.in global/qconfig.cpp)
# Handle QObject: Automoc does not work for this as it would
diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt
index 22f6ec4d34..7e02d7e19b 100644
--- a/src/widgets/CMakeLists.txt
+++ b/src/widgets/CMakeLists.txt
@@ -65,6 +65,8 @@ add_qt_module(Widgets
Qt::Gui
)
+add_dependencies(Widgets Qt::uic)
+
## Scopes:
#####################################################################
#