-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
65 lines (53 loc) · 1.62 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
# SPDX-FileCopyrightText: 2020 Pier Luigi Fiorini <[email protected]>
#
# SPDX-License-Identifier: MIT
cmake_minimum_required(VERSION 3.10.0)
project("XdgDesktopPortalLiri"
VERSION "0.0.0"
DESCRIPTION "xdg-desktop-portal backend for Liri"
LANGUAGES CXX C
)
## Shared macros and functions:
if(NOT LIRI_LOCAL_ECM)
find_package(LiriCMakeShared "2.0.0" REQUIRED NO_MODULE)
list(APPEND CMAKE_MODULE_PATH "${LCS_MODULE_PATH}")
endif()
## Add some paths to check for CMake modules:
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
## Set minimum versions required:
set(QT_MIN_VERSION "5.10.0")
## Liri specific setup common for all modules:
include(LiriSetup)
## Only build on the appropriate platforms.
if(NOT UNIX OR ANDROID)
message(NOTICE "Skipping the build as the condition \"UNIX OR ANDROID\" is not met.")
return()
endif()
## Features:
option(LIRI_ENABLE_SYSTEMD "Enable systemd support" ON)
add_feature_info("Liri::Systemd" LIRI_ENABLE_SYSTEMD "Enable systemd support")
## Variables:
if(LIRI_ENABLE_SYSTEMD)
set(INSTALL_SYSTEMDUSERUNITDIR "${INSTALL_LIBDIR}/systemd/user" CACHE PATH "systemd user unit directory [PREFIX/lib/systemd/user]")
endif()
## Find Wayland:
find_package(Wayland 1.15 COMPONENTS Client)
set_package_properties(Wayland PROPERTIES TYPE REQUIRED)
## Find Qt 5:
find_package(Qt5 "${QT_MIN_VERSION}"
CONFIG REQUIRED
COMPONENTS
Core
DBus
Xml
Gui
Widgets
PrintSupport
Qml
Quick
QuickControls2
WaylandClient
)
## Add subdirectories:
add_subdirectory(data)
add_subdirectory(src)