-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathCMakeLists.txt
85 lines (74 loc) · 2.26 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
cmake_minimum_required(VERSION 3.16)
project(Koi VERSION 0.4 LANGUAGES CXX)
configure_file(headers/config.h.in config.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/koi.desktop DESTINATION share/applications)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/icons/koi.svg DESTINATION share/icons/hicolor/scalable/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/icons/koi_tray.svg DESTINATION share/icons/hicolor/scalable/apps)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
find_package(KF6Config)
find_package(KF6CoreAddons)
find_package(KF6WidgetsAddons)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS DBus Gui Network Test)
find_package(Qt${QT_VERSION_MAJOR} OPTIONAL_COMPONENTS Widgets)
find_package(Qt${QT_VERSION_MAJOR} OPTIONAL_COMPONENTS Xml)
add_executable(koi
# Main app stuff.
about.cpp
license.cpp
mainwindow.cpp
utils.cpp
# QObject headers needs to be added as sources to properly run MOC and UIC.
headers/about.h
headers/license.h
headers/mainwindow.h
headers/utils.h
# UI items
resources/resources.qrc
ui/about.ui
ui/license.ui
ui/mainwindow.ui
# Libraries for additional stuff
libraries/SunRise.cpp
# All plugins
plugins/colorscheme.cpp
plugins/gtk.cpp
plugins/icons.cpp
plugins/kvantumstyle.cpp
plugins/plasmastyle.cpp
plugins/wallpaper.cpp
plugins/script.cpp
# Main entrypoint
main.cpp
)
target_compile_definitions(koi PUBLIC
QT_DEPRECATED_WARNINGS
)
target_link_libraries(koi PUBLIC
KF6::ConfigCore
KF6::ConfigGui
KF6::CoreAddons
KF6::WidgetsAddons
Qt::Core
Qt::DBus
Qt::Gui
Qt::Network
Qt::Test
Qt::Widgets
Qt::Xml
Threads::Threads
)
install(TARGETS koi
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)