File: CMakeLists.txt

package info (click to toggle)
ktorrent 5.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 23,004 kB
  • sloc: cpp: 44,753; ansic: 969; xml: 785; python: 560; ruby: 161; makefile: 11; sh: 10
file content (217 lines) | stat: -rw-r--r-- 4,796 bytes parent folder | download | duplicates (2)
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
cmake_minimum_required(VERSION 2.8.12)
project(KTORRENT)

set (QT_MIN_VERSION "5.7.0")
set (KF5_MIN_VERSION "5.15")

find_package(ECM REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/")

include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(FeatureSummary)
include(GenerateExportHeader)
include(ECMInstallIcons)
include(ECMAddAppIcon)
include(ECMMarkAsTest)
include(ECMMarkNonGuiExecutable)

find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED
    Core
    DBus
    Network
    Script
    Widgets
)

find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
    Config
    ConfigWidgets
    CoreAddons
    Crash
    DBusAddons
    I18n
    IconThemes
    KIO
    Notifications
    NotifyConfig
    KCMUtils
    Parts
    Solid
    WidgetsAddons
    WindowSystem
    XmlGui
)

find_package(KF5DocTools ${KF5_MIN_VERSION})

find_package(KF5Torrent 2.1 CONFIG REQUIRED)
find_package(Boost REQUIRED)

find_package(KF5TextWidgets ${KF5_REQUIRED_VERSION})
set_package_properties(KF5TextWidgets
  PROPERTIES
  TYPE OPTIONAL
  PURPOSE "Required for KTorrent's IP Filter plugin"
)
if(KF5TextWidgets_FOUND)
  set(HAVE_KF5TextWidgets 1)
endif()

find_package(KF5Archive ${KF5_REQUIRED_VERSION})
set_package_properties(KF5Archive
  PROPERTIES
  TYPE OPTIONAL
  PURPOSE "Required for KTorrent's scripting plugin"
)
if(KF5Archive_FOUND)
  set(HAVE_KF5Archive 1)
endif()

find_package(KF5ItemViews ${KF5_REQUIRED_VERSION})
set_package_properties(KF5ItemViews
  PROPERTIES
  TYPE OPTIONAL
  PURPOSE "Required for KTorrent's scripting plugin"
)
if(KF5ItemViews_FOUND)
  set(HAVE_KF5ItemViews 1)
endif()

find_package(KF5Kross ${KF5_REQUIRED_VERSION})
set_package_properties(KF5Kross
  PROPERTIES
  TYPE OPTIONAL
  PURPOSE "Required for KTorrent's scripting plugin"
)
if(KF5Kross_FOUND)
  set(HAVE_KF5Kross 1)
endif()

find_package(KF5Plotting ${KF5_REQUIRED_VERSION})
set_package_properties(KF5Plotting
  PROPERTIES
  TYPE OPTIONAL
  PURPOSE "Required for KTorrent's statistics plugin"
)
if(KF5Plotting_FOUND)
  set(HAVE_KF5Plotting 1)
endif()

find_package(KF5Syndication)
set_package_properties(KF5Syndication
  PROPERTIES
  TYPE OPTIONAL
  PURPOSE "Required for KTorrent's syndication plugin"
)
if(KF5Syndication_FOUND)
  set(HAVE_KF5Syndication 1)
endif()

find_package(KF5WebKit ${KF5_REQUIRED_VERSION})
set_package_properties(KF5WebKit
  PROPERTIES
  TYPE OPTIONAL
  PURPOSE "Required for KTorrent's search and syndication plugins"
)
if(KF5WebKit_FOUND)
  set(HAVE_KF5WebKit 1)
endif()

find_package(KF5DNSSD ${KF5_REQUIRED_VERSION})
set_package_properties(KF5DNSSD
  PROPERTIES
  TYPE OPTIONAL
  PURPOSE "Required for KTorrent's Zeroconf plugin"
)
if(KF5DNSSD_FOUND)
  set(HAVE_KF5DNSSD 1)
endif()

find_package(KF5Completion ${KF5_REQUIRED_VERSION})
set_package_properties(KF5Completion
  PROPERTIES
  TYPE OPTIONAL
  PURPOSE "Required for KTorrent's UPnP plugin"
)
if(KF5Completion_FOUND)
  set(HAVE_KF5Completion 1)
endif()

find_package(LibKWorkspace CONFIG)
set_package_properties(LibKWorkspace
  PROPERTIES
  TYPE OPTIONAL
  PURPOSE "Required for KTorrent's shutdown plugin"
)
if(LibKWorkspace_FOUND)
  set(HAVE_LibKWorkspace 1)
endif()

find_package(Taglib)
if(TAGLIB_FOUND)
  set(HAVE_Taglib 1)
endif()
#find_package(Qt5 ${QT_MIN_VERSION} OPTIONAL_COMPONENTS Multimedia MultimediaWidgets)
find_package(Phonon4Qt5)
set_package_properties(Taglib
  PROPERTIES
  TYPE OPTIONAL
  PURPOSE "Required for KTorrent's multimedia plugin"
)
set_package_properties(Phonon4Qt5
  PROPERTIES
  TYPE OPTIONAL
  PURPOSE "Required for KTorrent's multimedia plugin"
)

#
# checks for functions and stuff
#
include(CheckIncludeFiles)
include(CheckFunctionExists)
include(CheckTypeSize) #XFS


# according to http://www.cmake.org/pipermail/cmake/2008-June/022381.html
kde_enable_exceptions()

add_definitions(
  -DQT_USE_QSTRINGBUILDER
  -DQT_NO_CAST_TO_ASCII
  -DQT_NO_CAST_FROM_ASCII
  -DQT_STRICT_ITERATORS
  -DQT_NO_URL_CAST_FROM_STRING
  -DQT_NO_CAST_FROM_BYTEARRAY
  -DQT_NO_CAST_TO_BYTEARRAY
#   -DQT_NO_SIGNALS_SLOTS_KEYWORDS
  -DQT_USE_FAST_OPERATOR_PLUS
)

set (KTORRENT_DBUS_XML_DIR ${KTORRENT_SOURCE_DIR}/dbus_xml)
set (KTORRENT_PLUGIN_INSTALL_DIR ${PLUGIN_INSTALL_DIR}/ktorrent)

include_directories(
   ${Boost_INCLUDE_DIR}
)

add_subdirectory(libktcore)
add_subdirectory(plugins)
add_subdirectory(ktorrent)
add_subdirectory(ktupnptest)
#add_subdirectory(plasma)
add_subdirectory(ktmagnetdownloader)
if (KF5DocTools_FOUND)
    add_subdirectory(doc)
endif()

feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)

find_package(KF5I18n CONFIG REQUIRED)
ki18n_install(po)

  find_package(KF5DocTools CONFIG)
  if(KF5DocTools_FOUND)
    kdoctools_install(po)
  endif()