This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
59 lines (44 loc) · 1.51 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
cmake_minimum_required(VERSION 3.6.0)
project(cutie-home
VERSION 0.1
DESCRIPTION "Project Cutie homescreen")
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
include(FindPkgConfig)
include(FeatureSummary)
include(GNUInstallDirs)
option(USE_SYSTEMD "Use systemd services" ON)
set(QT_MIN_VERSION "5.15.0")
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS
Gui
Qml
Quick
DBus
WaylandCompositor
LinguistTools)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIPSTICK lipstick-qt5 REQUIRED IMPORTED_TARGET)
pkg_check_modules(MLITE5 mlite5 REQUIRED IMPORTED_TARGET)
pkg_check_modules(POLKITQT5 polkit-qt5-1 REQUIRED IMPORTED_TARGET)
find_package(ECM REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
find_package(KF5 REQUIRED COMPONENTS BluezQt)
add_definitions(-DBLUEZQT_VERSION_MAJOR=${KF5BluezQt_VERSION_MAJOR})
add_definitions(-DBLUEZQT_VERSION_MINOR=${KF5BluezQt_VERSION_MINOR})
include(KDEInstallDirs)
include(KDECMakeSettings)
add_subdirectory(src)
if(USE_SYSTEMD)
install(FILES data/lipstick.service
DESTINATION ${SYSTEMD_USER_UNIT_INSTALL_DIR})
endif()
# Translations
file(GLOB TS_FILES translations/*.ts)
qt5_add_translation(QM_FILES ${TS_FILES})
add_custom_target(translations DEPENDS ${QM_FILES})
add_dependencies(lipstick translations)
install(FILES ${QM_FILES}
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/lipstick-cutie-home-qt5/translations)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)