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.
This commit is contained in:
Lioncash 2019-08-25 18:13:21 -04:00
parent f140972920
commit f452516f12
1 changed files with 4 additions and 3 deletions

View File

@ -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}
)