-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathCMakeLists.txt
79 lines (59 loc) · 2.22 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
project(PapyrosShell)
cmake_minimum_required(VERSION 2.8.12)
set(CMAKE_AUTORCC ON)
option(ENABLE_MODEMMANAGER_SUPPORT "Enables ModemManager support" OFF)
# Set version
set(PROJECT_VERSION "0.1.0")
set(PROJECT_VERSION_MAJOR 0)
set(PROJECT_SOVERSION 0)
# Options
option(ENABLE_ALSA "Enables Alsa mixer backend" ON)
option(ENABLE_PULSEAUDIO "Enables PulseAudio mixer backend" ON)
# ECM setup
find_package(ECM 1.4.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} "${CMAKE_SOURCE_DIR}/cmake")
set(Qt5WaylandClient_DIR "${CMAKE_SOURCE_DIR}/cmake/Qt5WaylandClient")
# Macros
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECompilerSettings)
include(KDECMakeSettings)
# Build flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -Werror -Wall -Wextra -Wno-unused-parameter -pedantic -std=c++11")
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_STRICT_ITERATORS -DQT_NO_CAST_FROM_BYTEARRAY)
# Minimum version requirements
set(QT_MIN_VERSION "5.4.0")
set(KF5_MIN_VERSION "5.8.0")
# Find pkg-config here so that it can be referenced soon
find_package(PkgConfig)
find_package(PAM REQUIRED)
find_package(GreenIsland 0.7.1 REQUIRED)
# Find Qt5
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Core
DBus
Xml
Gui
Widgets
Qml
Quick)
find_package(Qt5WaylandClient 5.5.1 CONFIG REQUIRED COMPONENTS PRIVATE)
find_package(QT5XDG REQUIRED)
find_package(Papyros REQUIRED)
# Find KF5
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Solid Config Declarative NetworkManagerQt)
set(SHELL_PATH ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/greenisland/shells/io.papyros.shell)
greenisland_install_shell(io.papyros.shell shell)
install(DIRECTORY sddm/
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/sddm/themes/papyros
PATTERN dummydata EXCLUDE)
add_subdirectory(3rdparty)
add_subdirectory(data)
add_subdirectory(decorations)
add_subdirectory(headers)
add_subdirectory(modules)
add_subdirectory(session)
# Display featute summary
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)