diff options
author | Marcel <MTRNord@users.noreply.github.com> | 2017-11-06 16:17:21 +0100 |
---|---|---|
committer | mujx <mujx@users.noreply.github.com> | 2017-11-06 17:17:21 +0200 |
commit | 4ba1f2ea837f46607ec1738496ca546babd6b207 (patch) | |
tree | 6ffc880107627cc38ee87c78f325bd819a32f7e6 /CMakeLists.txt | |
parent | Update README (diff) | |
download | nheko-4ba1f2ea837f46607ec1738496ca546babd6b207.tar.xz |
Windows icon fix and change the installer to QT Installer Framework on Windows (#85)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a8c1e347..a5a0e28a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,25 @@ cmake_minimum_required(VERSION 3.1) -project(nheko C CXX) - option(BUILD_TESTS "Build all tests" OFF) option(APPVEYOR_BUILD "Build on appveyor" OFF) +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) + +# Include Qt basic functions +include(QtCommon) + +project(nheko LANGUAGES C CXX VERSION 0.1.0) + +# Set PROJECT_VERSION_PATCH and PROJECT_VERSION_TWEAK to 0 if not present, needed by add_project_meta +fix_project_version() + +# Set additional project information +set(COMPANY "Nheko") +set(COPYRIGHT "Copyright (c) 2017 Mujx") +set(IDENTIFIER "com.mujx.nheko") + +add_project_meta(META_FILES_TO_INCLUDE) + # # LMDB # @@ -296,14 +311,6 @@ qt5_add_resources(QRC resources/res.qrc) add_library(matrix_events ${MATRIX_EVENTS} src/Deserializable.cc) target_link_libraries(matrix_events Qt5::Core) -# -# Bundle icons. -# -if (APPLE) - set(ICON_FILE resources/nheko.icns) - set_source_files_properties(${ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) -endif() - if (BUILD_TESTS) enable_testing() @@ -330,15 +337,15 @@ else() set (NHEKO_LIBS matrix_events Qt5::Widgets Qt5::Network Qt5::Concurrent ${LMDB_LIBRARY}) endif() -set (NHEKO_DEPS ${OS_BUNDLE} ${SRC_FILES} ${UI_HEADERS} ${MOC_HEADERS} ${QRC} ${LANG_QRC} ${QM_SRC}) +set (NHEKO_DEPS ${SRC_FILES} ${UI_HEADERS} ${MOC_HEADERS} ${QRC} ${LANG_QRC} ${QM_SRC} ${META_FILES_TO_INCLUDE}) if(APPLE) - add_executable (nheko ${NHEKO_DEPS}) + add_executable (nheko ${OS_BUNDLE} ${NHEKO_DEPS}) target_link_libraries (nheko ${NHEKO_LIBS} Qt5::MacExtras) elseif(WIN32) - add_executable (nheko ${ICON_FILE} ${NHEKO_DEPS}) + add_executable (nheko ${OS_BUNDLE} ${ICON_FILE} ${NHEKO_DEPS}) target_link_libraries (nheko ${NTDLIB} ${NHEKO_LIBS} Qt5::WinMain) else() - add_executable (nheko ${NHEKO_DEPS}) + add_executable (nheko ${OS_BUNDLE} ${NHEKO_DEPS}) target_link_libraries (nheko ${NHEKO_LIBS}) endif() |