-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathCMakeLists.txt
139 lines (110 loc) · 3.76 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include(FeatureSummary)
include(GenerateExportHeader)
include(ECMGenerateHeaders)
include(ECMDeprecationSettings)
include(ECMQtDeclareLoggingCategory)
find_package(KF6 ${REQUIRED_KF_VERSION} REQUIRED COMPONENTS
# DocTools
# Runner
Notifications
# NotifyConfig
Su
# Wallet
IdleTime
Declarative
I18n
Crash
GlobalAccel
DBusAddons
# Wayland
CoreAddons
People
# ActivitiesStats
# Activities
KIO
# Prison
Package
Archive
# IconThemes
# UnitConversion
# ItemModels
# Init
#[[TextEditor]])
find_package(KDED CONFIG REQUIRED)
find_package(CaskServer REQUIRED)
find_package(Fontconfig)
set_package_properties(Fontconfig PROPERTIES DESCRIPTION "Font access configuration library"
URL "https://www.freedesktop.org/wiki/Software/fontconfig"
TYPE OPTIONAL
PURPOSE "Needed to build font configuration and installation tools")
if(FONTCONFIG_FOUND)
# kfontinst
find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED COMPONENTS PrintSupport)
endif()
find_package(Phonon4Qt6 4.6.60 REQUIRED NO_MODULE)
set_package_properties(Phonon4Qt6 PROPERTIES
DESCRIPTION "Qt-based audio library"
TYPE REQUIRED)
add_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII)
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_subdirectory(caskautostart)
#add_subdirectory(kcminit)
#add_subdirectory(waitforname)
#if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
# add_subdirectory(systemd)
#endif()
#qt_add_dbus_interface(
#startplasma_SRCS
#${CMAKE_SOURCE_DIR}/ksplash/ksplashqml/org.kde.KSplash.xml
#ksplashinterface
#)
ecm_set_disabled_deprecation_versions(
QT 5.15.2
KF 5.98.0
KDECLARATIVE 5.88.0
KRUNNER 5.103.0
)
set(startcask_SRCS
autostartscriptdesktopfile.cpp
updatelaunchenvjob.cpp)
ecm_qt_declare_logging_category(startcask_SRCS HEADER debug.h IDENTIFIER CASK_STARTUP CATEGORY_NAME org.cask.startup)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR})
add_library(startcask OBJECT startcask.cpp ${startcask_SRCS})
target_link_libraries(startcask PUBLIC
Qt6::Core
Qt6::DBus
CaskServer::CaskServerLib
KF6::ConfigCore
KF6::Notifications
KF6::Package
${PHONON_LIBRARIES})
add_executable(startcask-wayland ${START_CASK_COMMON_SRCS} startcask-wayland.cpp)
target_link_libraries(startcask-wayland PRIVATE
startcask)
message( "CASKSTARTUP" ${CMAKE_CURRENT_BINARY_DIR})
add_subdirectory(cask-session)
#add_subdirectory(plasma-shutdown)
#FIXME: reconsider, looks fishy
if(NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr")
set_property(SOURCE startcask.cpp APPEND PROPERTY COMPILE_DEFINITIONS
XCURSOR_PATH="${KDE_INSTALL_FULL_DATAROOTDIR}/icons:$XCURSOR_PATH:~/.icons:/usr/share/icons:/usr/share/pixmaps:/usr/X11R6/lib/X11/icons")
endif()
set(CASK_WAYLAND_DESKTOP_FILENAME cask-session.desktop CACHE INTERNAL "Filename for Cask Wayland session")
configure_file(config-startcask.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-startcask.h)
configure_file(cask-session.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/${CASK_WAYLAND_DESKTOP_FILENAME})
install(TARGETS startcask-wayland ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS cask-sourceenv.sh DESTINATION ${KDE_INSTALL_LIBEXECDIR})
install(PROGRAMS cask-dbus-run-session-if-needed DESTINATION ${KDE_INSTALL_LIBEXECDIR})
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/${CASK_WAYLAND_DESKTOP_FILENAME}
DESTINATION ${KDE_INSTALL_DATADIR}/wayland-sessions)
install(FILES cask.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES cask.desktop DESTINATION ${KDE_INSTALL_AUTOSTARTDIR})