2018-03-15 00:25:29 +00:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
|
|
|
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
2019-08-25 08:55:33 +00:00
|
|
|
find_package(Qt5 COMPONENTS LinguistTools Network Qml Svg Widgets Xml REQUIRED)
|
2018-03-15 00:25:29 +00:00
|
|
|
|
2018-03-23 21:54:52 +00:00
|
|
|
if(WIN32)
|
|
|
|
list(APPEND PLAT_SRCS platforms/win/amuse-gui.rc platforms/win/amuse-gui.manifest)
|
|
|
|
elseif(APPLE)
|
2018-07-09 18:05:31 +00:00
|
|
|
list(APPEND PLAT_SRCS platforms/mac/mainicon.icns MacOSExtras.mm)
|
2018-03-23 21:54:52 +00:00
|
|
|
set_source_files_properties(platforms/mac/mainicon.icns PROPERTIES
|
|
|
|
MACOSX_PACKAGE_LOCATION Resources)
|
|
|
|
endif()
|
|
|
|
|
2018-03-15 00:25:29 +00:00
|
|
|
add_subdirectory(platforms/freedesktop)
|
|
|
|
declare_qticon_target()
|
|
|
|
list(APPEND PLAT_SRCS mainicon_qt.cpp)
|
|
|
|
|
2018-07-25 06:01:01 +00:00
|
|
|
configure_file(resources/translation_res.qrc translation_res.qrc @ONLY)
|
|
|
|
set(TRANSLATIONS
|
|
|
|
resources/lang_de.ts)
|
|
|
|
QT5_CREATE_TRANSLATION(QM_FILES ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../lib ${TRANSLATIONS})
|
|
|
|
|
2018-07-09 18:05:31 +00:00
|
|
|
QT5_ADD_RESOURCES(qrc_resources.cpp resources/resources.qrc)
|
2018-07-25 06:01:01 +00:00
|
|
|
QT5_ADD_RESOURCES(qrc_translation_res.cpp ${CMAKE_CURRENT_BINARY_DIR}/translation_res.qrc OPTIONS -no-compress)
|
2018-07-09 18:05:31 +00:00
|
|
|
|
2018-08-04 02:31:47 +00:00
|
|
|
QT5_WRAP_UI(MAIN_WINDOW_UI MainWindow.ui)
|
|
|
|
|
|
|
|
QT5_WRAP_CPP(AMUSE_MOC
|
|
|
|
Common.hpp
|
|
|
|
MainWindow.hpp
|
|
|
|
KeyboardWidget.hpp
|
|
|
|
StatusBarWidget.hpp
|
|
|
|
ProjectModel.hpp
|
|
|
|
EditorWidget.hpp
|
|
|
|
SoundMacroEditor.hpp
|
|
|
|
ADSREditor.hpp
|
|
|
|
CurveEditor.hpp
|
|
|
|
KeymapEditor.hpp
|
|
|
|
LayersEditor.hpp
|
|
|
|
SampleEditor.hpp
|
|
|
|
SoundGroupEditor.hpp
|
2018-08-10 06:19:23 +00:00
|
|
|
SongGroupEditor.hpp
|
2018-08-16 06:26:44 +00:00
|
|
|
NewSoundMacroDialog.hpp
|
|
|
|
StudioSetupWidget.hpp)
|
2018-08-04 02:31:47 +00:00
|
|
|
|
2018-03-15 00:25:29 +00:00
|
|
|
add_executable(amuse-gui WIN32 MACOSX_BUNDLE
|
2018-07-14 06:06:33 +00:00
|
|
|
Common.hpp Common.cpp
|
2018-08-04 02:31:47 +00:00
|
|
|
MainWindow.ui ${MAIN_WINDOW_UI} MainWindow.hpp MainWindow.cpp
|
2018-07-09 18:05:31 +00:00
|
|
|
KeyboardWidget.hpp KeyboardWidget.cpp
|
2018-08-16 06:26:44 +00:00
|
|
|
StatusBarWidget.hpp StatusBarWidget.cpp
|
2018-07-09 18:05:31 +00:00
|
|
|
ProjectModel.hpp ProjectModel.cpp
|
2018-07-14 06:06:33 +00:00
|
|
|
EditorWidget.hpp EditorWidget.cpp
|
2018-07-09 18:05:31 +00:00
|
|
|
SoundMacroEditor.hpp SoundMacroEditor.cpp
|
2018-07-18 07:39:26 +00:00
|
|
|
ADSREditor.hpp ADSREditor.cpp
|
|
|
|
CurveEditor.hpp CurveEditor.cpp
|
2018-07-09 18:05:31 +00:00
|
|
|
KeymapEditor.hpp KeymapEditor.cpp
|
|
|
|
LayersEditor.hpp LayersEditor.cpp
|
|
|
|
SampleEditor.hpp SampleEditor.cpp
|
2018-07-18 07:39:26 +00:00
|
|
|
SoundGroupEditor.hpp SoundGroupEditor.cpp
|
2018-07-09 18:05:31 +00:00
|
|
|
SongGroupEditor.hpp SongGroupEditor.cpp
|
2018-08-10 06:19:23 +00:00
|
|
|
NewSoundMacroDialog.hpp NewSoundMacroDialog.cpp
|
2018-08-16 06:26:44 +00:00
|
|
|
StudioSetupWidget.hpp StudioSetupWidget.cpp
|
2018-07-28 04:34:29 +00:00
|
|
|
MIDIReader.hpp MIDIReader.cpp
|
2018-07-09 18:05:31 +00:00
|
|
|
resources/resources.qrc qrc_resources.cpp
|
2018-07-25 06:01:01 +00:00
|
|
|
${QM_FILES} qrc_translation_res.cpp
|
2018-08-04 02:31:47 +00:00
|
|
|
${AMUSE_MOC} ${PLAT_SRCS}
|
2018-03-15 00:25:29 +00:00
|
|
|
main.cpp)
|
2018-07-14 06:06:33 +00:00
|
|
|
if(COMMAND add_sanitizers)
|
|
|
|
add_sanitizers(amuse-gui)
|
|
|
|
endif()
|
2018-03-15 00:25:29 +00:00
|
|
|
|
|
|
|
set_target_properties(amuse-gui PROPERTIES
|
2019-08-25 08:55:33 +00:00
|
|
|
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/platforms/mac/Info.plist"
|
|
|
|
)
|
2018-03-15 00:25:29 +00:00
|
|
|
|
2019-08-25 08:55:33 +00:00
|
|
|
target_link_libraries(amuse-gui
|
|
|
|
${PLAT_LIBS}
|
|
|
|
|
|
|
|
Qt5::Network
|
|
|
|
Qt5::Qml
|
|
|
|
Qt5::Svg
|
|
|
|
Qt5::Widgets
|
|
|
|
Qt5::Xml
|
|
|
|
|
|
|
|
amuse
|
|
|
|
athena-core
|
|
|
|
boo
|
|
|
|
${BOO_SYS_LIBS}
|
|
|
|
logvisor
|
|
|
|
lzokay
|
|
|
|
xxhash
|
|
|
|
${ZLIB_LIBRARIES}
|
|
|
|
)
|