From bb0deccf19116735db3724734b79b89d8dbdf2e3 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Tue, 29 Jan 2019 17:49:04 +0100 Subject: 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 --- src/corelib/CMakeLists.txt | 3 +++ src/widgets/CMakeLists.txt | 2 ++ 2 files changed, 5 insertions(+) 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: ##################################################################### # -- cgit v1.2.3