-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
86 lines (70 loc) · 2.21 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
cmake_minimum_required(VERSION 3.5)
set(PROJECT_NAME cyber-settings)
project(${PROJECT_NAME})
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(QT Core Gui Widgets Quick QuickControls2 DBus Xml Concurrent LinguistTools)
find_package(Qt5 REQUIRED ${QT})
find_package(MeuiKit REQUIRED)
find_package(Freetype REQUIRED)
find_package(PkgConfig REQUIRED)
find_package(Libcrypt REQUIRED)
find_package(KF5NetworkManagerQt REQUIRED)
find_package(KF5ModemManagerQt REQUIRED)
find_package(KF5CoreAddons REQUIRED)
pkg_search_module(FontConfig REQUIRED fontconfig IMPORTED_TARGET)
pkg_search_module(ICU REQUIRED icu-i18n)
include_directories(${ICU_INCLUDE_DIRS})
set(SRCS
src/application.cpp
src/main.cpp
src/appearance.cpp
src/battery.cpp
src/brightness.cpp
src/fontsmodel.cpp
src/language.cpp
src/about.cpp
src/background.cpp
src/password.cpp
)
set(RESOURCES
src/resources.qrc
)
qt5_add_dbus_adaptor(DBUS_SOURCES
src/org.cyber.SettingsUI.xml
src/application.h Application)
set_source_files_properties(${DBUS_SOURCES} PROPERTIES SKIP_AUTOGEN ON)
add_executable(${PROJECT_NAME} ${DBUS_SOURCES} ${SRCS} ${RESOURCES})
target_link_libraries(${PROJECT_NAME}
Qt5::Core
Qt5::Widgets
Qt5::Quick
Qt5::QuickControls2
Qt5::DBus
Qt5::Xml
Qt5::Concurrent
MeuiKit
KF5::NetworkManagerQt
KF5::ModemManagerQt
KF5::CoreAddons
PkgConfig::FontConfig
${FREETYPE_LIBRARIES}
${ICU_LDFLAGS}
Libcrypt::Libcrypt
)
file(GLOB TS_FILES translations/*.ts)
qt5_create_translation(QM_FILES ${TS_FILES})
add_custom_target(translations DEPENDS ${QM_FILES} SOURCES ${TS_FILES})
add_dependencies(${PROJECT_NAME} translations)
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION /usr/bin)
install(FILES
cyber-settings.desktop
DESTINATION /usr/share/applications/
COMPONENT Runtime
)
install(FILES ${QM_FILES} DESTINATION /usr/share/${PROJECT_NAME}/translations)