metaforce/hecl-gui/CMakeLists.txt

107 lines
2.4 KiB
CMake
Raw Normal View History

2017-12-06 03:31:43 +00:00
cmake_minimum_required(VERSION 3.10)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
find_package(Qt5Widgets)
find_package(Qt5Network)
2018-01-03 00:24:45 +00:00
find_package(Qt5Xml)
2017-12-06 03:31:43 +00:00
if(APPLE)
set(PLAT_SRCS MacOSSystemVersion.hpp MacOSSystemVersion.mm)
set_source_files_properties(MacOSSystemVersion.mm
PROPERTIES COMPILE_FLAGS -fobjc-arc
)
find_library(FOUNDATION_LIBRARY Foundation)
set(PLAT_LIBS ${FOUNDATION_LIBRARY})
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
set(PLAT_LIBS pthread dl)
endif()
if(WIN32)
2017-12-27 04:10:44 +00:00
list(APPEND PLAT_SRCS platforms/win/hecl-gui.rc platforms/win/hecl-gui.manifest)
elseif(APPLE)
list(APPEND PLAT_SRCS platforms/mac/mainicon.icns)
set_source_files_properties(platforms/mac/mainicon.icns PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
endif()
add_subdirectory(platforms/freedesktop)
declare_qticon_target()
list(APPEND PLAT_SRCS mainicon_qt.cpp)
2018-01-10 06:19:48 +00:00
file(GLOB QUAZIP_SRCS quazip/quazip/*.c quazip/quazip/*.cpp quazip/quazip/*.h)
list(REMOVE_ITEM QUAZIP_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazip/quagzipfile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/quazip/quazip/quagzipfile.h
)
2019-07-28 01:20:18 +00:00
if (NOT MSVC)
set_source_files_properties(${QUAZIP_SRCS} PROPERTIES COMPILE_OPTIONS -Wno-deprecated-declarations)
endif()
2018-01-10 06:19:48 +00:00
add_executable(hecl-gui WIN32 MACOSX_BUNDLE
ArgumentEditor.cpp
ArgumentEditor.hpp
ArgumentEditor.ui
Common.cpp
Common.hpp
DownloadManager.cpp
DownloadManager.hpp
ErrorLabel.hpp
EscapeSequenceParser.cpp
EscapeSequenceParser.hpp
ExtractZip.cpp
ExtractZip.hpp
FileDirDialog.hpp
FindBlender.cpp
FindBlender.hpp
LaunchMenu.cpp
LaunchMenu.hpp
MainWindow.cpp
MainWindow.hpp
MainWindow.ui
SysReqTableView.cpp
SysReqTableView.hpp
VectorISATableModel.hpp
VectorISATableModelIntel.hpp
VectorISATableView.cpp
VectorISATableView.hpp
main.cpp
${PLAT_SRCS}
${QUAZIP_SRCS}
)
2018-05-06 23:09:17 +00:00
if(COMMAND add_sanitizers)
add_sanitizers(hecl-gui)
endif()
2019-06-12 02:03:12 +00:00
if (NOT MSVC)
target_compile_options(hecl-gui PRIVATE -Wno-misleading-indentation)
endif()
set_target_properties(hecl-gui PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/platforms/mac/Info.plist"
)
2017-12-06 03:31:43 +00:00
2019-06-12 02:03:12 +00:00
target_include_directories(hecl-gui PRIVATE quazip/quazip)
target_compile_definitions(hecl-gui PRIVATE QUAZIP_STATIC=1)
target_link_libraries(hecl-gui
${PLAT_LIBS}
${Qt5Network_LIBRARIES}
${Qt5Widgets_LIBRARIES}
${Qt5Xml_LIBRARIES}
athena-core
hecl-light
logvisor
xxhash
z
zeus
)