mirror of https://github.com/AxioDL/amuse.git
CMakeLists: Set CMAKE_AUTORCC
Allows the build system to automatically handle qrc resource files automatically without having to do all the manual book keeping.
This commit is contained in:
parent
f452516f12
commit
56a7d842b5
|
@ -1,13 +1,12 @@
|
||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
# Automatically handle invoking autorcc, moc, and uic.
|
||||||
|
|
||||||
# Automatically handle invoking moc
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
# Automatically handle invoking uic
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
|
||||||
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
find_package(Qt5 COMPONENTS LinguistTools Network Qml Svg Widgets Xml REQUIRED)
|
find_package(Qt5 COMPONENTS LinguistTools Network Qml Svg Widgets Xml REQUIRED)
|
||||||
|
|
||||||
configure_file(resources/translation_res.qrc translation_res.qrc @ONLY)
|
configure_file(resources/translation_res.qrc translation_res.qrc @ONLY)
|
||||||
|
@ -16,9 +15,6 @@ set(TRANSLATIONS
|
||||||
)
|
)
|
||||||
QT5_CREATE_TRANSLATION(QM_FILES ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../lib ${TRANSLATIONS})
|
QT5_CREATE_TRANSLATION(QM_FILES ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../lib ${TRANSLATIONS})
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
add_executable(amuse-gui WIN32 MACOSX_BUNDLE
|
add_executable(amuse-gui WIN32 MACOSX_BUNDLE
|
||||||
ADSREditor.cpp
|
ADSREditor.cpp
|
||||||
ADSREditor.hpp
|
ADSREditor.hpp
|
||||||
|
@ -58,9 +54,8 @@ add_executable(amuse-gui WIN32 MACOSX_BUNDLE
|
||||||
|
|
||||||
main.cpp
|
main.cpp
|
||||||
|
|
||||||
qrc_resources.cpp
|
|
||||||
qrc_translation_res.cpp
|
|
||||||
resources/resources.qrc
|
resources/resources.qrc
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/translation_res.qrc
|
||||||
|
|
||||||
${QM_FILES}
|
${QM_FILES}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue