forked from KDE/kaffeine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
131 lines (110 loc) · 3.32 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
project(kaffeine)
set(KAFFEINE_MAJOR_VERSION 2)
set(KAFFEINE_MINOR_VERSION 0)
set(KAFFEINE_PATCH_VERSION 18)
# 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)
if(POLICY CMP0002)
cmake_policy(SET CMP0002 NEW)
endif(POLICY CMP0002)
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
WindowSystem # KStartupInfo
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)
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
# FreeBSD has a fully-working v4l, but needs help finding it
unset(_dvb_headers)
find_package(Libdvbv5)
if (Libdvbv5_FOUND)
find_path(_dvb_headers
NAMES dmx.h
PATH_SUFFIXES dvb linux/dvb
)
if(_dvb_headers)
include_directories(${_dvb_headers})
endif()
endif()
if(NOT _dvb_headers)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
endif()
else()
# Linux (and others) have a weird copy of v4l headers to use
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
endif()
include_directories(${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(icons)
add_subdirectory(profiles)
add_subdirectory(src)
if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/po/CMakeLists.txt" )
add_subdirectory(po)
endif()
endif()
if(KF5DocTools_VERSION)
add_subdirectory(doc)
endif(KF5DocTools_VERSION)
if(BUILD_TOOLS)
add_subdirectory(tools)
endif(BUILD_TOOLS)