-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
CMakeLists.txt
105 lines (85 loc) · 2.65 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
95
96
97
98
99
100
101
102
103
104
105
project(kaffeine)
set(KAFFEINE_MAJOR_VERSION 2)
set(KAFFEINE_MINOR_VERSION 0)
set(KAFFEINE_PATCH_VERSION 6)
# comment/uuncomment below if either the version is a production or a development one
#set(KAFFEINE_EXTRA_VERSION -git)
set(KAFFEINE_VERSION
${KAFFEINE_MAJOR_VERSION}.${KAFFEINE_MINOR_VERSION}.${KAFFEINE_PATCH_VERSION}${KAFFEINE_EXTRA_VERSION})
option(BUILD_TOOLS "Build the helper tools" OFF)
# Minimal versions where build is known to work
cmake_minimum_required(VERSION 2.8.12)
set(QT_MIN_VERSION "5.4.0")
set(KF5_MIN_VERSION "5.11.0")
# shut up cmake warnings about newer policies
if(POLICY CMP0063)
cmake_policy(SET CMP0063 NEW)
endif(POLICY CMP0063)
find_package(Qt5Core)
find_package(ECM 1.0.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH
${ECM_MODULE_PATH}
${ECM_KDE_MODULE_DIR}
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
include(FeatureSummary)
include(ECMInstallIcons)
include(CheckIncludeFiles)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
# Find Qt modules
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Core # QCommandLineParser, QStringLiteral
Widgets # QApplication
Network
Sql
X11Extras
)
# Find KDE modules
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
CoreAddons # KAboutData
I18n # KLocalizedString
WidgetsAddons # KMessageBox
XmlGui # KActonCollection
KIO # KFileWidget
Solid
DBusAddons
)
find_package(KF5DocTools ${KF5_MIN_VERSION} QUIET)
find_package(X11 REQUIRED)
find_package(VLC 1.2 REQUIRED)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_BINARY_DIR} ${VLC_INCLUDE_DIRS}
${X11_Xscreensaver_INCLUDE_PATH})
check_include_files(${CMAKE_CURRENT_SOURCE_DIR}/include/frontend.h HAVE_DVB)
if(NOT HAVE_DVB)
MESSAGE(STATUS "Disabled features:\nDVB Digital television support for Linux\n")
set(HAVE_DVB 0)
else()
set(HAVE_DVB 1)
endif(NOT HAVE_DVB)
if(HAVE_DVB)
find_package(Libdvbv5)
if(NOT Libdvbv5_FOUND)
set(HAVE_LIBDVBV5 0)
set(HAVE_DVB 0)
message(STATUS "Disabled features:\nDVB Digital television support for Linux, as libdvbv5 was not found.\n")
endif(NOT Libdvbv5_FOUND)
endif(HAVE_DVB)
add_subdirectory(deviceactions)
add_subdirectory(dtvdaemon)
add_subdirectory(icons)
add_subdirectory(profiles)
add_subdirectory(src)
if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
ki18n_install(po)
endif()
if(KF5DocTools_VERSION)
add_subdirectory(doc)
endif(KF5DocTools_VERSION)
if(BUILD_TOOLS)
add_subdirectory(tools)
endif(BUILD_TOOLS)