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)
|
2017-12-26 04:27:18 +00:00
|
|
|
find_package(Qt5Network)
|
2018-01-03 00:24:45 +00:00
|
|
|
find_package(Qt5Xml)
|
2017-12-06 03:31:43 +00:00
|
|
|
|
2017-12-25 21:53:37 +00:00
|
|
|
if(APPLE)
|
|
|
|
set(PLAT_SRCS MacOSSystemVersion.hpp MacOSSystemVersion.mm)
|
2018-01-14 06:42:13 +00:00
|
|
|
set_source_files_properties(MacOSSystemVersion.mm
|
|
|
|
PROPERTIES COMPILE_FLAGS -fobjc-arc)
|
2017-12-25 21:53:37 +00:00
|
|
|
find_library(FOUNDATION_LIBRARY Foundation)
|
|
|
|
set(PLAT_LIBS ${FOUNDATION_LIBRARY})
|
2018-01-11 16:28:44 +00:00
|
|
|
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
|
|
|
set(PLAT_LIBS pthread dl)
|
2017-12-25 21:53:37 +00:00
|
|
|
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)
|
2017-12-25 21:53:37 +00:00
|
|
|
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()
|
2017-12-29 08:04:44 +00:00
|
|
|
list(APPEND PLAT_SRCS mainicon_qt.cpp)
|
2017-12-25 21:53:37 +00:00
|
|
|
|
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)
|
|
|
|
include_directories(quazip/quazip)
|
|
|
|
add_definitions(-DQUAZIP_STATIC=1)
|
|
|
|
|
2017-12-25 21:53:37 +00:00
|
|
|
add_executable(hecl-gui WIN32 MACOSX_BUNDLE
|
2017-12-06 03:31:43 +00:00
|
|
|
MainWindow.ui MainWindow.hpp MainWindow.cpp
|
2018-01-10 06:19:48 +00:00
|
|
|
LaunchMenu.hpp LaunchMenu.cpp
|
2018-01-03 00:24:45 +00:00
|
|
|
EscapeSequenceParser.hpp EscapeSequenceParser.cpp
|
2018-01-02 04:21:45 +00:00
|
|
|
FileDirDialog.hpp ErrorLabel.hpp
|
2017-12-25 21:53:37 +00:00
|
|
|
SysReqTableView.hpp SysReqTableView.cpp
|
|
|
|
VectorISATableView.hpp VectorISATableView.cpp
|
|
|
|
VectorISATableModel.hpp VectorISATableModelIntel.hpp
|
2018-01-10 06:19:48 +00:00
|
|
|
FindBlender.hpp FindBlender.cpp
|
2017-12-26 04:27:18 +00:00
|
|
|
DownloadManager.hpp DownloadManager.cpp
|
2018-01-10 06:19:48 +00:00
|
|
|
ExtractZip.hpp ExtractZip.cpp ${QUAZIP_SRCS}
|
2017-12-26 04:27:18 +00:00
|
|
|
Common.hpp Common.cpp ${PLAT_SRCS} main.cpp)
|
2017-12-25 21:53:37 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
2018-01-03 00:24:45 +00:00
|
|
|
target_link_libraries(hecl-gui ${PLAT_LIBS}
|
2018-01-10 06:19:48 +00:00
|
|
|
${Qt5Widgets_LIBRARIES}
|
|
|
|
${Qt5Network_LIBRARIES}
|
|
|
|
${Qt5Xml_LIBRARIES}
|
|
|
|
hecl-light logvisor zeus athena-core athena-libyaml xxhash z)
|