From f452516f12481071c76d59f31a5820fe8c39225f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 25 Aug 2019 18:13:21 -0400 Subject: [PATCH] CMakeLists: Set CMAKE_AUTOUIC Allows the build system to automatically handle invoking uic for UI files. This is beneficial since CMake will cache runs of uic, avoiding running it again if its not necessary (no modifications were made to the file, etc). This also means we don't need to keep track of all the UI files explicitly in the CMake file. --- Editor/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Editor/CMakeLists.txt b/Editor/CMakeLists.txt index 311d866..148257f 100644 --- a/Editor/CMakeLists.txt +++ b/Editor/CMakeLists.txt @@ -5,6 +5,9 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) # Automatically handle invoking moc set(CMAKE_AUTOMOC ON) +# Automatically handle invoking uic +set(CMAKE_AUTOUIC ON) + find_package(Qt5 COMPONENTS LinguistTools Network Qml Svg Widgets Xml REQUIRED) configure_file(resources/translation_res.qrc translation_res.qrc @ONLY) @@ -16,8 +19,6 @@ QT5_CREATE_TRANSLATION(QM_FILES ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOUR QT5_ADD_RESOURCES(qrc_resources.cpp resources/resources.qrc) QT5_ADD_RESOURCES(qrc_translation_res.cpp ${CMAKE_CURRENT_BINARY_DIR}/translation_res.qrc OPTIONS -no-compress) -QT5_WRAP_UI(MAIN_WINDOW_UI MainWindow.ui) - add_executable(amuse-gui WIN32 MACOSX_BUNDLE ADSREditor.cpp ADSREditor.hpp @@ -56,11 +57,11 @@ add_executable(amuse-gui WIN32 MACOSX_BUNDLE StudioSetupWidget.hpp main.cpp + qrc_resources.cpp qrc_translation_res.cpp resources/resources.qrc - ${MAIN_WINDOW_UI} ${QM_FILES} )