-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
58 lines (48 loc) · 1.31 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
cmake_minimum_required(VERSION 3.10.0)
project("AppCenter"
VERSION "0.1.0"
DESCRIPTION "Software center"
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 C++ standard:
set(CMAKE_CXX_STANDARD 17)
## 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()
## Find Qt 5.
find_package(Qt5 "${QT_MIN_VERSION}"
CONFIG REQUIRED
COMPONENTS
Core
DBus
Concurrent
Gui
Qml
Quick
QuickControls2
LinguistTools
)
## Treat warnings as errors:
add_compile_options(-Wall -Wextra -Werror)
## Add subdirectories:
add_subdirectory(src/framework)
add_subdirectory(src/app)
add_subdirectory(src/notifier)
add_subdirectory(src/imports/appcenter)
if(LINUX AND NOT ANDROID)
add_subdirectory(src/plugins/flatpak)
endif()
add_subdirectory(src/plugins/odrs)