2017-04-06 02:06:42 +03:00
|
|
|
cmake_minimum_required(VERSION 3.1)
|
|
|
|
|
2017-10-01 22:38:46 +03:00
|
|
|
option(APPVEYOR_BUILD "Build on appveyor" OFF)
|
2018-05-04 18:11:03 +03:00
|
|
|
option(ASAN "Compile with address sanitizers" OFF)
|
2017-05-02 04:22:33 +03:00
|
|
|
|
2017-11-06 18:17:21 +03:00
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
|
|
|
|
2018-01-09 21:34:01 +03:00
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
2017-11-06 18:17:21 +03:00
|
|
|
# Include Qt basic functions
|
|
|
|
include(QtCommon)
|
|
|
|
|
2018-03-22 17:20:22 +03:00
|
|
|
project(nheko LANGUAGES C CXX)
|
|
|
|
set(CPACK_PACKAGE_VERSION_MAJOR "0")
|
2018-05-03 19:09:22 +03:00
|
|
|
set(CPACK_PACKAGE_VERSION_MINOR "4")
|
2018-06-02 10:22:24 +03:00
|
|
|
set(CPACK_PACKAGE_VERSION_PATCH "3")
|
2018-03-22 20:13:38 +03:00
|
|
|
set(PROJECT_VERSION_MAJOR ${CPACK_PACKAGE_VERSION_MAJOR})
|
|
|
|
set(PROJECT_VERSION_MINOR ${CPACK_PACKAGE_VERSION_MINOR})
|
|
|
|
set(PROJECT_VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH})
|
2017-11-06 18:17:21 +03:00
|
|
|
|
2018-03-22 20:13:38 +03:00
|
|
|
# Set PROJECT_VERSION_PATCH & PROJECT_VERSION_TWEAK to 0 if not present
|
|
|
|
# Needed by add_project_meta.
|
2017-11-06 18:17:21 +03:00
|
|
|
fix_project_version()
|
|
|
|
|
|
|
|
# Set additional project information
|
|
|
|
set(COMPANY "Nheko")
|
2018-05-05 22:40:24 +03:00
|
|
|
set(COPYRIGHT "Copyright (c) 2017 Nheko Contributors")
|
|
|
|
set(IDENTIFIER "com.github.mujx.nheko")
|
2017-11-06 18:17:21 +03:00
|
|
|
|
|
|
|
add_project_meta(META_FILES_TO_INCLUDE)
|
|
|
|
|
2017-07-29 11:49:00 +03:00
|
|
|
#
|
|
|
|
# LMDB
|
|
|
|
#
|
2018-03-29 09:59:04 +03:00
|
|
|
include(LMDB)
|
2017-07-29 11:49:00 +03:00
|
|
|
|
2017-07-09 12:49:17 +03:00
|
|
|
#
|
|
|
|
# Discover Qt dependencies.
|
|
|
|
#
|
2017-04-06 02:06:42 +03:00
|
|
|
find_package(Qt5Widgets REQUIRED)
|
|
|
|
find_package(Qt5Network REQUIRED)
|
2017-05-29 19:09:12 +03:00
|
|
|
find_package(Qt5LinguistTools REQUIRED)
|
2017-10-21 21:17:01 +03:00
|
|
|
find_package(Qt5Concurrent REQUIRED)
|
2018-04-28 21:19:16 +03:00
|
|
|
find_package(Qt5Svg REQUIRED)
|
2017-12-01 16:39:50 +03:00
|
|
|
find_package(Qt5Multimedia REQUIRED)
|
2017-04-06 02:06:42 +03:00
|
|
|
|
2017-07-01 16:34:36 +03:00
|
|
|
if (APPLE)
|
|
|
|
find_package(Qt5MacExtras REQUIRED)
|
|
|
|
endif(APPLE)
|
|
|
|
|
2017-05-30 14:35:01 +03:00
|
|
|
if (Qt5Widgets_FOUND)
|
|
|
|
if (Qt5Widgets_VERSION VERSION_LESS 5.7.0)
|
|
|
|
message(STATUS "Qt version ${Qt5Widgets_VERSION}")
|
2017-05-30 14:44:51 +03:00
|
|
|
message(WARNING "Minimum supported Qt5 version is 5.7!")
|
2017-05-30 14:35:01 +03:00
|
|
|
endif()
|
|
|
|
endif(Qt5Widgets_FOUND)
|
|
|
|
|
2017-07-09 12:49:17 +03:00
|
|
|
#
|
|
|
|
# Set up compiler flags.
|
|
|
|
#
|
2017-04-06 02:06:42 +03:00
|
|
|
set(CMAKE_C_COMPILER gcc)
|
2018-02-11 20:28:32 +03:00
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
2017-04-06 02:06:42 +03:00
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
2018-03-29 09:59:04 +03:00
|
|
|
include(CompilerFlags)
|
2017-04-06 02:06:42 +03:00
|
|
|
|
2017-04-11 18:25:39 +03:00
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
|
|
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
|
2017-04-06 14:58:48 +03:00
|
|
|
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
|
|
|
|
FORCE)
|
2017-04-11 18:25:39 +03:00
|
|
|
message("Setting build type to '${CMAKE_BUILD_TYPE}'")
|
|
|
|
else(NOT CMAKE_BUILD_TYPE)
|
|
|
|
message("Build type set to '${CMAKE_BUILD_TYPE}'")
|
|
|
|
endif(NOT CMAKE_BUILD_TYPE)
|
|
|
|
|
2018-03-22 17:20:22 +03:00
|
|
|
find_program(GIT git)
|
|
|
|
if(GIT)
|
|
|
|
execute_process(
|
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
|
|
COMMAND ${GIT} rev-parse --short HEAD
|
|
|
|
OUTPUT_VARIABLE GIT_OUT OUTPUT_STRIP_TRAILING_WHITESPACE
|
2017-04-06 14:58:48 +03:00
|
|
|
)
|
2018-03-22 17:20:22 +03:00
|
|
|
set(CPACK_PACKAGE_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH}-${GIT_OUT}")
|
|
|
|
endif(GIT)
|
2017-04-11 18:25:39 +03:00
|
|
|
|
|
|
|
set(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
|
|
|
set(PROJECT_VERSION ${CPACK_PACKAGE_VERSION})
|
|
|
|
|
|
|
|
message(STATUS "Version: ${PROJECT_VERSION}")
|
|
|
|
|
2018-03-22 17:20:22 +03:00
|
|
|
cmake_host_system_information(RESULT BUILD_HOST QUERY HOSTNAME)
|
|
|
|
set(BUILD_USER $ENV{USER})
|
|
|
|
configure_file(cmake/version.hpp config/version.hpp)
|
|
|
|
|
2018-03-25 00:36:27 +03:00
|
|
|
|
2017-07-09 12:49:17 +03:00
|
|
|
#
|
|
|
|
# Declare source and header files.
|
|
|
|
#
|
2017-04-06 02:06:42 +03:00
|
|
|
set(SRC_FILES
|
2017-11-30 14:53:28 +03:00
|
|
|
# Dialogs
|
2017-12-12 00:00:37 +03:00
|
|
|
src/dialogs/CreateRoom.cc
|
2017-11-30 21:02:46 +03:00
|
|
|
src/dialogs/ImageOverlay.cc
|
2018-02-18 23:52:31 +03:00
|
|
|
src/dialogs/PreviewUploadOverlay.cc
|
2017-12-11 00:59:50 +03:00
|
|
|
src/dialogs/InviteUsers.cc
|
2017-11-30 21:02:46 +03:00
|
|
|
src/dialogs/JoinRoom.cc
|
2018-05-01 19:35:28 +03:00
|
|
|
src/dialogs/MemberList.cpp
|
2017-11-30 21:02:46 +03:00
|
|
|
src/dialogs/LeaveRoom.cc
|
|
|
|
src/dialogs/Logout.cc
|
2018-01-03 19:05:49 +03:00
|
|
|
src/dialogs/ReadReceipts.cc
|
2018-03-12 23:23:26 +03:00
|
|
|
src/dialogs/ReCaptcha.cpp
|
2018-04-30 21:41:47 +03:00
|
|
|
src/dialogs/RoomSettings.cpp
|
2017-11-30 14:53:28 +03:00
|
|
|
|
|
|
|
# Emoji
|
2017-11-30 21:02:46 +03:00
|
|
|
src/emoji/Category.cc
|
|
|
|
src/emoji/ItemDelegate.cc
|
|
|
|
src/emoji/Panel.cc
|
|
|
|
src/emoji/PickButton.cc
|
|
|
|
src/emoji/Provider.cc
|
2017-11-30 14:53:28 +03:00
|
|
|
|
|
|
|
# Timeline
|
|
|
|
src/timeline/TimelineViewManager.cc
|
|
|
|
src/timeline/TimelineItem.cc
|
|
|
|
src/timeline/TimelineView.cc
|
2017-12-01 16:39:50 +03:00
|
|
|
src/timeline/widgets/AudioItem.cc
|
2017-11-30 14:53:28 +03:00
|
|
|
src/timeline/widgets/FileItem.cc
|
|
|
|
src/timeline/widgets/ImageItem.cc
|
2017-12-01 16:39:50 +03:00
|
|
|
src/timeline/widgets/VideoItem.cc
|
2017-11-30 14:53:28 +03:00
|
|
|
|
|
|
|
# UI components
|
|
|
|
src/ui/Avatar.cc
|
|
|
|
src/ui/Badge.cc
|
|
|
|
src/ui/LoadingIndicator.cc
|
|
|
|
src/ui/FlatButton.cc
|
|
|
|
src/ui/FloatingButton.cc
|
|
|
|
src/ui/Label.cc
|
|
|
|
src/ui/OverlayModal.cc
|
|
|
|
src/ui/ScrollBar.cc
|
|
|
|
src/ui/SnackBar.cc
|
|
|
|
src/ui/RaisedButton.cc
|
|
|
|
src/ui/Ripple.cc
|
|
|
|
src/ui/RippleOverlay.cc
|
|
|
|
src/ui/OverlayWidget.cc
|
|
|
|
src/ui/TextField.cc
|
|
|
|
src/ui/ToggleButton.cc
|
|
|
|
src/ui/Theme.cc
|
|
|
|
src/ui/ThemeManager.cc
|
|
|
|
|
2017-06-05 02:14:05 +03:00
|
|
|
src/AvatarProvider.cc
|
2017-07-29 11:49:00 +03:00
|
|
|
src/Cache.cc
|
2017-10-04 11:33:34 +03:00
|
|
|
src/ChatPage.cc
|
2018-01-09 16:07:32 +03:00
|
|
|
src/CommunitiesListItem.cc
|
|
|
|
src/CommunitiesList.cc
|
|
|
|
src/Community.cc
|
2017-12-11 00:59:50 +03:00
|
|
|
src/InviteeItem.cc
|
2017-04-06 02:06:42 +03:00
|
|
|
src/LoginPage.cc
|
|
|
|
src/MainWindow.cc
|
|
|
|
src/MatrixClient.cc
|
2017-10-04 11:33:34 +03:00
|
|
|
src/QuickSwitcher.cc
|
|
|
|
src/RegisterPage.cc
|
2017-04-06 02:06:42 +03:00
|
|
|
src/RoomInfoListItem.cc
|
|
|
|
src/RoomList.cc
|
2017-12-14 22:55:00 +03:00
|
|
|
src/RunGuard.cc
|
2017-10-15 22:08:51 +03:00
|
|
|
src/SideBarActions.cc
|
2017-05-19 03:28:15 +03:00
|
|
|
src/Splitter.cc
|
2018-03-25 00:16:15 +03:00
|
|
|
src/SuggestionsPopup.cpp
|
2017-04-06 02:06:42 +03:00
|
|
|
src/TextInputWidget.cc
|
|
|
|
src/TopRoomBar.cc
|
2017-10-04 11:33:34 +03:00
|
|
|
src/TrayIcon.cc
|
|
|
|
src/TypingDisplay.cc
|
2018-01-05 01:27:32 +03:00
|
|
|
src/Utils.cc
|
2017-04-06 02:06:42 +03:00
|
|
|
src/UserInfoWidget.cc
|
2017-11-30 14:53:28 +03:00
|
|
|
src/UserSettingsPage.cc
|
2017-04-06 02:06:42 +03:00
|
|
|
src/WelcomePage.cc
|
|
|
|
src/main.cc
|
|
|
|
)
|
|
|
|
|
2018-03-29 09:59:04 +03:00
|
|
|
# ExternalProject dependencies
|
|
|
|
set(EXTERNAL_PROJECT_DEPS "")
|
|
|
|
|
2018-03-03 14:02:33 +03:00
|
|
|
#
|
|
|
|
# matrix-structs
|
|
|
|
#
|
2018-03-29 09:59:04 +03:00
|
|
|
find_library(MATRIX_STRUCTS_LIBRARY
|
|
|
|
NAMES matrix_structs
|
|
|
|
PATHS ${MATRIX_STRUCTS_ROOT}
|
|
|
|
${MATRIX_STRUCTS_ROOT}/lib
|
|
|
|
${MATRIX_STRUCTS_ROOT}/lib/static)
|
|
|
|
|
|
|
|
if(NOT MATRIX_STRUCTS_LIBRARY)
|
|
|
|
include(MatrixStructs)
|
|
|
|
set(EXTERNAL_PROJECT_DEPS ${EXTERNAL_PROJECT_DEPS} MatrixStructs)
|
|
|
|
endif()
|
|
|
|
include_directories(SYSTEM ${MATRIX_STRUCTS_INCLUDE_DIR})
|
2018-03-03 14:02:33 +03:00
|
|
|
|
2018-03-16 18:56:45 +03:00
|
|
|
#
|
2018-03-29 09:59:04 +03:00
|
|
|
# tweeny
|
2018-03-16 18:56:45 +03:00
|
|
|
#
|
2018-03-29 09:59:04 +03:00
|
|
|
if(NOT TWEENY_INCLUDE_DIR)
|
|
|
|
include(Tweeny)
|
|
|
|
set(EXTERNAL_PROJECT_DEPS ${EXTERNAL_PROJECT_DEPS} Tweeny)
|
|
|
|
endif()
|
|
|
|
include_directories(SYSTEM ${TWEENY_INCLUDE_DIR})
|
2018-03-16 18:56:45 +03:00
|
|
|
|
2018-03-03 14:02:33 +03:00
|
|
|
#
|
|
|
|
# lmdbxx
|
|
|
|
#
|
2018-03-29 09:59:04 +03:00
|
|
|
if(NOT LMDBXX_INCLUDE_DIR)
|
|
|
|
include(LMDBXX)
|
|
|
|
set(EXTERNAL_PROJECT_DEPS ${EXTERNAL_PROJECT_DEPS} lmdbxx)
|
|
|
|
endif()
|
|
|
|
include_directories(SYSTEM ${LMDBXX_INCLUDE_DIR})
|
2018-03-03 14:02:33 +03:00
|
|
|
|
2017-04-06 02:06:42 +03:00
|
|
|
include_directories(include)
|
|
|
|
include_directories(include/ui)
|
2018-03-22 17:20:22 +03:00
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/config)
|
2017-08-06 11:01:46 +03:00
|
|
|
|
2017-04-06 02:06:42 +03:00
|
|
|
qt5_wrap_cpp(MOC_HEADERS
|
2017-11-30 14:53:28 +03:00
|
|
|
# Dialogs
|
2017-12-12 00:00:37 +03:00
|
|
|
include/dialogs/CreateRoom.h
|
2017-11-30 21:02:46 +03:00
|
|
|
include/dialogs/ImageOverlay.h
|
2018-02-18 23:52:31 +03:00
|
|
|
include/dialogs/PreviewUploadOverlay.h
|
2017-12-11 00:59:50 +03:00
|
|
|
include/dialogs/InviteUsers.h
|
2017-11-30 21:02:46 +03:00
|
|
|
include/dialogs/JoinRoom.h
|
2018-05-01 19:35:28 +03:00
|
|
|
include/dialogs/MemberList.hpp
|
2017-11-30 21:02:46 +03:00
|
|
|
include/dialogs/LeaveRoom.h
|
|
|
|
include/dialogs/Logout.h
|
2018-01-03 19:05:49 +03:00
|
|
|
include/dialogs/ReadReceipts.h
|
2018-03-12 23:23:26 +03:00
|
|
|
include/dialogs/ReCaptcha.hpp
|
2018-04-30 21:41:47 +03:00
|
|
|
include/dialogs/RoomSettings.hpp
|
2017-11-30 14:53:28 +03:00
|
|
|
|
|
|
|
# Emoji
|
2017-11-30 21:02:46 +03:00
|
|
|
include/emoji/Category.h
|
|
|
|
include/emoji/ItemDelegate.h
|
|
|
|
include/emoji/Panel.h
|
|
|
|
include/emoji/PickButton.h
|
2017-11-30 14:53:28 +03:00
|
|
|
|
|
|
|
# Timeline
|
|
|
|
include/timeline/TimelineItem.h
|
|
|
|
include/timeline/TimelineView.h
|
|
|
|
include/timeline/TimelineViewManager.h
|
2017-12-01 16:39:50 +03:00
|
|
|
include/timeline/widgets/AudioItem.h
|
2017-11-30 14:53:28 +03:00
|
|
|
include/timeline/widgets/FileItem.h
|
|
|
|
include/timeline/widgets/ImageItem.h
|
2017-12-01 16:39:50 +03:00
|
|
|
include/timeline/widgets/VideoItem.h
|
2017-11-30 14:53:28 +03:00
|
|
|
|
|
|
|
# UI components
|
|
|
|
include/ui/Avatar.h
|
|
|
|
include/ui/Badge.h
|
|
|
|
include/ui/LoadingIndicator.h
|
|
|
|
include/ui/FlatButton.h
|
|
|
|
include/ui/Label.h
|
|
|
|
include/ui/FloatingButton.h
|
|
|
|
include/ui/OverlayWidget.h
|
|
|
|
include/ui/ScrollBar.h
|
|
|
|
include/ui/SnackBar.h
|
|
|
|
include/ui/RaisedButton.h
|
|
|
|
include/ui/Ripple.h
|
|
|
|
include/ui/RippleOverlay.h
|
|
|
|
include/ui/TextField.h
|
|
|
|
include/ui/ToggleButton.h
|
|
|
|
include/ui/Theme.h
|
|
|
|
include/ui/ThemeManager.h
|
|
|
|
|
2017-06-05 02:14:05 +03:00
|
|
|
include/AvatarProvider.h
|
2018-01-21 22:43:21 +03:00
|
|
|
include/Cache.h
|
2017-04-06 02:06:42 +03:00
|
|
|
include/ChatPage.h
|
2018-01-09 16:07:32 +03:00
|
|
|
include/CommunitiesListItem.h
|
|
|
|
include/CommunitiesList.h
|
2017-04-06 02:06:42 +03:00
|
|
|
include/LoginPage.h
|
|
|
|
include/MainWindow.h
|
2017-12-11 00:59:50 +03:00
|
|
|
include/InviteeItem.h
|
2017-04-06 02:06:42 +03:00
|
|
|
include/MatrixClient.h
|
2017-10-04 11:33:34 +03:00
|
|
|
include/QuickSwitcher.h
|
2017-04-06 02:06:42 +03:00
|
|
|
include/RegisterPage.h
|
|
|
|
include/RoomInfoListItem.h
|
|
|
|
include/RoomList.h
|
2017-10-15 22:08:51 +03:00
|
|
|
include/SideBarActions.h
|
2017-05-19 03:28:15 +03:00
|
|
|
include/Splitter.h
|
2018-03-25 00:16:15 +03:00
|
|
|
include/SuggestionsPopup.hpp
|
2017-10-04 11:33:34 +03:00
|
|
|
include/TextInputWidget.h
|
2017-04-06 02:06:42 +03:00
|
|
|
include/TopRoomBar.h
|
2017-05-21 16:36:06 +03:00
|
|
|
include/TrayIcon.h
|
2017-10-04 11:33:34 +03:00
|
|
|
include/TypingDisplay.h
|
|
|
|
include/UserInfoWidget.h
|
2017-11-30 14:53:28 +03:00
|
|
|
include/UserSettingsPage.h
|
2017-04-06 02:06:42 +03:00
|
|
|
include/WelcomePage.h
|
|
|
|
)
|
|
|
|
|
2017-07-09 12:49:17 +03:00
|
|
|
#
|
|
|
|
# Bundle translations.
|
|
|
|
#
|
2018-03-29 09:59:04 +03:00
|
|
|
include(Translations)
|
|
|
|
set(TRANSLATION_DEPS ${LANG_QRC} ${QRC} ${QM_SRC})
|
2017-05-29 19:09:12 +03:00
|
|
|
|
2018-03-29 09:59:04 +03:00
|
|
|
set(COMMON_LIBS
|
|
|
|
${MATRIX_STRUCTS_LIBRARY}
|
|
|
|
Qt5::Widgets
|
|
|
|
Qt5::Network
|
2018-04-28 21:19:16 +03:00
|
|
|
Qt5::Svg
|
2018-03-29 09:59:04 +03:00
|
|
|
Qt5::Concurrent)
|
2017-12-03 03:47:37 +03:00
|
|
|
|
2017-10-01 22:38:46 +03:00
|
|
|
if(APPVEYOR_BUILD)
|
2017-12-03 03:47:37 +03:00
|
|
|
set(NHEKO_LIBS ${COMMON_LIBS} lmdb)
|
2017-10-01 22:38:46 +03:00
|
|
|
else()
|
2017-12-03 03:47:37 +03:00
|
|
|
set(NHEKO_LIBS ${COMMON_LIBS} ${LMDB_LIBRARY})
|
2017-10-01 22:38:46 +03:00
|
|
|
endif()
|
|
|
|
|
2018-05-05 22:40:24 +03:00
|
|
|
if (APPLE)
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework Foundation")
|
|
|
|
set(SRC_FILES ${SRC_FILES} src/notifications/ManagerMac.mm)
|
|
|
|
elseif (WIN32)
|
|
|
|
set(SRC_FILES ${SRC_FILES} src/notifications/ManagerWin.cpp)
|
|
|
|
else ()
|
|
|
|
set(SRC_FILES ${SRC_FILES} src/notifications/ManagerLinux.cpp)
|
|
|
|
endif ()
|
|
|
|
|
2018-03-29 09:59:04 +03:00
|
|
|
set(NHEKO_DEPS
|
|
|
|
${SRC_FILES}
|
|
|
|
${UI_HEADERS}
|
|
|
|
${MOC_HEADERS}
|
|
|
|
${TRANSLATION_DEPS}
|
|
|
|
${META_FILES_TO_INCLUDE})
|
2017-10-08 16:49:56 +03:00
|
|
|
|
2018-05-04 18:11:03 +03:00
|
|
|
if(ASAN)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address,undefined")
|
|
|
|
endif()
|
|
|
|
|
2017-10-08 16:49:56 +03:00
|
|
|
if(APPLE)
|
2017-11-06 18:17:21 +03:00
|
|
|
add_executable (nheko ${OS_BUNDLE} ${NHEKO_DEPS})
|
2017-12-01 16:39:50 +03:00
|
|
|
target_link_libraries (nheko ${NHEKO_LIBS} Qt5::MacExtras Qt5::Multimedia)
|
2017-10-08 16:49:56 +03:00
|
|
|
elseif(WIN32)
|
2017-11-06 18:17:21 +03:00
|
|
|
add_executable (nheko ${OS_BUNDLE} ${ICON_FILE} ${NHEKO_DEPS})
|
2017-12-01 16:39:50 +03:00
|
|
|
target_link_libraries (nheko ${NTDLIB} ${NHEKO_LIBS} Qt5::WinMain Qt5::Multimedia)
|
2017-10-08 16:49:56 +03:00
|
|
|
else()
|
2017-11-06 18:17:21 +03:00
|
|
|
add_executable (nheko ${OS_BUNDLE} ${NHEKO_DEPS})
|
2017-12-01 16:39:50 +03:00
|
|
|
target_link_libraries (nheko ${NHEKO_LIBS} Qt5::Multimedia)
|
2017-05-02 04:22:33 +03:00
|
|
|
endif()
|
2018-01-09 21:34:01 +03:00
|
|
|
|
2018-03-29 09:59:04 +03:00
|
|
|
if(EXTERNAL_PROJECT_DEPS)
|
|
|
|
add_dependencies(nheko ${EXTERNAL_PROJECT_DEPS})
|
|
|
|
endif()
|
2018-03-03 14:02:33 +03:00
|
|
|
|
2018-01-09 21:34:01 +03:00
|
|
|
if(UNIX AND NOT APPLE)
|
|
|
|
install (TARGETS nheko RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
|
|
|
install (FILES "resources/nheko-16.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/16x16/apps" RENAME "nheko.png")
|
|
|
|
install (FILES "resources/nheko-32.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/32x32/apps" RENAME "nheko.png")
|
|
|
|
install (FILES "resources/nheko-48.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps" RENAME "nheko.png")
|
|
|
|
install (FILES "resources/nheko-64.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/64x64/apps" RENAME "nheko.png")
|
|
|
|
install (FILES "resources/nheko-128.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps" RENAME "nheko.png")
|
|
|
|
install (FILES "resources/nheko-256.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps" RENAME "nheko.png")
|
|
|
|
install (FILES "resources/nheko-512.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps" RENAME "nheko.png")
|
|
|
|
install (FILES "resources/nheko.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
2018-02-02 02:02:30 +03:00
|
|
|
install (FILES "resources/nheko.appdata.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo")
|
2018-01-09 21:34:01 +03:00
|
|
|
|
|
|
|
if(NOT TARGET uninstall)
|
|
|
|
configure_file(
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
|
|
|
IMMEDIATE @ONLY)
|
|
|
|
add_custom_target(uninstall
|
|
|
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
|
|
|
endif()
|
|
|
|
endif()
|