-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
94 lines (74 loc) · 2.37 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
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
set(VERSION_MAJOR "1")
set(VERSION_MINOR "0")
set(VERSION_PATCH "0")
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
project(pak-gui VERSION ${VERSION} LANGUAGES CXX)
if(POLICY CMP0153)
cmake_policy(SET CMP0153 NEW)
endif()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic")
set(QT_MIN_VERSION "5.12.8")
set(KF_MIN_VERSION "5.68.0")
find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/packages")
include(ECMInstallIcons)
include(ECMSetupVersion)
include(ECMOptionalAddSubdirectory)
include(GenerateExportHeader)
include(ECMAddAppIcon)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(ECMAddTests)
include(ECMAddAppIcon)
include(CMakePackageConfigHelpers)
include(ECMSetupQtPluginMacroNames)
include(ECMQtDeclareLoggingCategory)
include(FeatureSummary)
option(RUN_TESTS "Allow tests for classes" OFF)
if(RUN_TESTS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
endif()
find_package(pak REQUIRED)
find_package(pacman-contrib REQUIRED)
find_package(kdesu5 REQUIRED)
find_package(ksshaskpass REQUIRED)
find_package(bash REQUIRED)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets Charts Concurrent Network)
find_package(Git)
find_package(devtools)
find_package(auracle)
find_package(namcap)
find_package(reflector)
find_package(subversion)
find_package(fzf)
find_package(downgrade)
find_package(libnotify)
if(RUN_TESTS)
add_definitions(-DRUN_TESTS)
message("Tests enabled")
endif(RUN_TESTS)
find_package(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS
ConfigWidgets
CoreAddons
Crash
DBusAddons
DocTools
I18n
XmlGui
Notifications)
install(PROGRAMS com.github.juliagoda.pak-gui.desktop DESTINATION ${KDE_INSTALL_APPDIR})
include_directories(${CMAKE_SOURCE_DIR}/src)
add_subdirectory(doc)
add_subdirectory(src)
add_subdirectory(resources)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
if(RUN_TESTS)
enable_testing()
add_subdirectory(tests)
endif(RUN_TESTS)