1 | cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR) |
---|
2 | project(transmission) |
---|
3 | |
---|
4 | list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) |
---|
5 | |
---|
6 | include(CheckIncludeFile) |
---|
7 | include(CheckIncludeFiles) |
---|
8 | include(CheckFunctionExists) |
---|
9 | include(CheckLibraryExists) |
---|
10 | include(ExternalProject) |
---|
11 | include(GNUInstallDirs) |
---|
12 | include(TrMacros) |
---|
13 | |
---|
14 | option(ENABLE_DAEMON "Build daemon" ON) |
---|
15 | tr_auto_option(ENABLE_GTK "Build GTK+ client" AUTO) |
---|
16 | tr_auto_option(ENABLE_QT "Build Qt client" AUTO) |
---|
17 | option(ENABLE_UTILS "Build utils (create, edit, show)" ON) |
---|
18 | option(ENABLE_CLI "Build command-line client" OFF) |
---|
19 | option(ENABLE_TESTS "Build unit tests" ON) |
---|
20 | option(ENABLE_LIGHTWEIGHT "Optimize libtransmission for low-resource systems: smaller cache size, prefer unencrypted peer connections, etc." OFF) |
---|
21 | option(ENABLE_UTP "Build µTP support" ON) |
---|
22 | option(ENABLE_NLS "Enable native language support" ON) |
---|
23 | option(INSTALL_DOC "Build/install documentation" ON) |
---|
24 | option(INSTALL_LIB "Install the library" OFF) |
---|
25 | option(USE_QT5 "Use Qt 5 (instead of default Qt 4)" OFF) |
---|
26 | tr_auto_option(USE_SYSTEM_EVENT2 "Use system event2 library" AUTO) |
---|
27 | tr_auto_option(USE_SYSTEM_DHT "Use system dht library" AUTO) |
---|
28 | tr_auto_option(USE_SYSTEM_MINIUPNPC "Use system miniupnpc library" AUTO) |
---|
29 | tr_auto_option(USE_SYSTEM_NATPMP "Use system natpmp library" AUTO) |
---|
30 | tr_auto_option(USE_SYSTEM_UTP "Use system utp library" AUTO) |
---|
31 | tr_auto_option(WITH_INOTIFY "Enable inotify support (on systems that support it)" AUTO) |
---|
32 | tr_auto_option(WITH_KQUEUE "Enable kqueue support (on systems that support it)" AUTO) |
---|
33 | tr_auto_option(WITH_SYSTEMD "Add support for systemd startup notification (on systems that support it)" AUTO) |
---|
34 | |
---|
35 | set(TR_NAME ${PROJECT_NAME}) |
---|
36 | |
---|
37 | # convention: -TR MAJOR MINOR MAINT STATUS - (each a single char) |
---|
38 | # STATUS: "X" for prerelease beta builds, |
---|
39 | # "Z" for unsupported trunk builds, |
---|
40 | # "0" for stable, supported releases |
---|
41 | # these should be the only two lines you need to change |
---|
42 | set(TR_USER_AGENT_PREFIX "2.84+") |
---|
43 | set(TR_PEER_ID_PREFIX "-TR284Z-") |
---|
44 | |
---|
45 | string(REGEX MATCH "^([0-9]+)\\.([0-9]+).*" TR_VERSION "${TR_USER_AGENT_PREFIX}") |
---|
46 | set(TR_VERSION_MAJOR "${CMAKE_MATCH_1}") |
---|
47 | set(TR_VERSION_MINOR "${CMAKE_MATCH_2}") |
---|
48 | |
---|
49 | if(TR_PEER_ID_PREFIX MATCHES "X-$") |
---|
50 | set(TR_BETA_RELEASE 1) |
---|
51 | elseif(TR_PEER_ID_PREFIX MATCHES "Z-$") |
---|
52 | set(TR_NIGHTLY_RELEASE 1) |
---|
53 | else() |
---|
54 | set(TR_STABLE_RELEASE 1) |
---|
55 | endif() |
---|
56 | |
---|
57 | if(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.svn) |
---|
58 | find_package(Subversion) |
---|
59 | if(Subversion_FOUND) |
---|
60 | Subversion_WC_INFO(${CMAKE_SOURCE_DIR} TR_SVN) |
---|
61 | set(TR_SCM_REVISION "${TR_SVN_WC_REVISION}") |
---|
62 | endif() |
---|
63 | |
---|
64 | if("${TR_SCM_REVISION}" STREQUAL "") |
---|
65 | file(GLOB_RECURSE TR_ALL_SOURCES RELATIVE ${CMAKE_SOURCE_DIR} *.cc *.[chm] *.po) |
---|
66 | set(TR_SCM_REVISION 0) |
---|
67 | foreach(F ${TR_ALL_SOURCES}) |
---|
68 | file(STRINGS ${F} F_ID REGEX "\\$Id:") |
---|
69 | if(F_ID MATCHES "\\$Id: [^ ]+ ([0-9]+) " AND CMAKE_MATCH_1 GREATER TR_SCM_REVISION) |
---|
70 | set(TR_SCM_REVISION ${CMAKE_MATCH_1}) |
---|
71 | endif() |
---|
72 | endforeach() |
---|
73 | endif() |
---|
74 | elseif(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git) |
---|
75 | find_package(Git) |
---|
76 | if(GIT_FOUND) |
---|
77 | execute_process( |
---|
78 | COMMAND |
---|
79 | ${GIT_EXECUTABLE} rev-list --max-count=1 --abbrev-commit HEAD |
---|
80 | WORKING_DIRECTORY |
---|
81 | ${CMAKE_SOURCE_DIR} |
---|
82 | OUTPUT_VARIABLE |
---|
83 | TR_SCM_REVISION |
---|
84 | OUTPUT_STRIP_TRAILING_WHITESPACE |
---|
85 | ) |
---|
86 | endif() |
---|
87 | endif() |
---|
88 | |
---|
89 | if("${TR_SCM_REVISION}" STREQUAL "") |
---|
90 | set(TR_SCM_REVISION 0) |
---|
91 | endif() |
---|
92 | |
---|
93 | set(CURL_MINIMUM 7.15.4) |
---|
94 | set(EVENT2_MINIMUM 2.0.10) |
---|
95 | set(OPENSSL_MINIMUM 0.9.4) |
---|
96 | set(ZLIB_MINIMUM 1.2.3) |
---|
97 | set(GTK_MINIMUM 3.4.0) |
---|
98 | set(GLIB_MINIMUM 2.32.0) |
---|
99 | set(GIO_MINIMUM 2.26.0) |
---|
100 | set(LIBAPPINDICATOR_MINIMUM 0.4.90) |
---|
101 | |
---|
102 | tr_github_upstream(EVENT2 libevent/libevent be1aeff21a b9135e43c925b1f86ec43ea71a8c367a) |
---|
103 | tr_github_upstream(NATPMP miniupnp/libnatpmp 31ebda6226 7e8deb00a98220622a6f2aeb98b8921b) |
---|
104 | tr_github_upstream(MINIUPNPC miniupnp/miniupnp c490b42547 f9b7a4715bcd5034abae866e31102888) |
---|
105 | tr_github_upstream(DHT jech/dht bf62643a95 0a2a2abe447d8a73f0084c1bc837e566) |
---|
106 | tr_github_upstream(UTP bittorrent/libutp 7c4f19abdf 8b92aa05abec5f6675cdde6477cd6f51) |
---|
107 | |
---|
108 | if(WIN32) |
---|
109 | foreach(L C CXX) |
---|
110 | # Target version (Vista and up) |
---|
111 | set(CMAKE_${L}_FLAGS "${CMAKE_${L}_FLAGS} -DWINVER=0x0600 -D_WIN32_WINNT=0x0600") |
---|
112 | # Use Unicode API (although we always use W or A names explicitly) |
---|
113 | set(CMAKE_${L}_FLAGS "${CMAKE_${L}_FLAGS} -DUNICODE -D_UNICODE") |
---|
114 | # Filter out needless definitions |
---|
115 | set(CMAKE_${L}_FLAGS "${CMAKE_${L}_FLAGS} -DWIN32_LEAN_AND_MEAN -DNOMINMAX") |
---|
116 | # Ignore various deprecation and security warnings (at least for now) |
---|
117 | set(CMAKE_${L}_FLAGS "${CMAKE_${L}_FLAGS} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS") |
---|
118 | # Increase maximum FD_SET size |
---|
119 | set(CMAKE_${L}_FLAGS "${CMAKE_${L}_FLAGS} -DFD_SETSIZE=1024") |
---|
120 | if(MSVC) |
---|
121 | # Reduce noise (at least for now) |
---|
122 | set(CMAKE_${L}_FLAGS "${CMAKE_${L}_FLAGS} /wd4244 /wd4267") |
---|
123 | endif() |
---|
124 | endforeach() |
---|
125 | endif() |
---|
126 | |
---|
127 | find_package(Threads) |
---|
128 | find_package(PkgConfig QUIET) |
---|
129 | |
---|
130 | find_package(OpenSSL ${OPENSSL_MINIMUM} REQUIRED) |
---|
131 | find_package(CURL ${CURL_MINIMUM} REQUIRED) |
---|
132 | |
---|
133 | if(UNIX) |
---|
134 | find_package(ICONV REQUIRED) |
---|
135 | endif() |
---|
136 | |
---|
137 | if(ENABLE_GTK) |
---|
138 | tr_get_required_flag(ENABLE_GTK GTK_IS_REQUIRED) |
---|
139 | |
---|
140 | pkg_check_modules(GTK ${GTK_IS_REQUIRED} |
---|
141 | gtk+-3.0>=${GTK_MINIMUM} |
---|
142 | glib-2.0>=${GLIB_MINIMUM} |
---|
143 | gio-2.0>=${GIO_MINIMUM} |
---|
144 | gmodule-2.0>=${GLIB_MINIMUM} |
---|
145 | gthread-2.0>=${GLIB_MINIMUM}) |
---|
146 | |
---|
147 | tr_fixup_auto_option(ENABLE_GTK GTK_FOUND GTK_IS_REQUIRED) |
---|
148 | |
---|
149 | set(WITH_LIBAPPINDICATOR OFF) |
---|
150 | if(ENABLE_GTK) |
---|
151 | pkg_check_modules(LIBAPPINDICATOR appindicator3-0.1>=${LIBAPPINDICATOR_MINIMUM}) |
---|
152 | if(LIBAPPINDICATOR_FOUND) |
---|
153 | set(WITH_LIBAPPINDICATOR ON) |
---|
154 | endif() |
---|
155 | endif() |
---|
156 | endif() |
---|
157 | |
---|
158 | if(ENABLE_QT) |
---|
159 | tr_get_required_flag(ENABLE_QT QT_IS_REQUIRED) |
---|
160 | |
---|
161 | if(POLICY CMP0020) |
---|
162 | cmake_policy(SET CMP0020 NEW) |
---|
163 | endif() |
---|
164 | |
---|
165 | if(USE_QT5) |
---|
166 | set(TR_QT5_MODULES Core Gui Widgets Network DBus LinguistTools) |
---|
167 | set(QT_FOUND ON) |
---|
168 | foreach(M ${TR_QT5_MODULES}) |
---|
169 | find_package(Qt5${M} ${QT_IS_REQUIRED}) |
---|
170 | if(NOT Qt5${M}_FOUND) |
---|
171 | set(QT_FOUND OFF) |
---|
172 | break() |
---|
173 | endif() |
---|
174 | endforeach() |
---|
175 | else() |
---|
176 | find_package(Qt4 4.6.2 ${QT_IS_REQUIRED} COMPONENTS QtCore QtGui QtNetwork QtDBus) |
---|
177 | endif() |
---|
178 | |
---|
179 | tr_fixup_auto_option(ENABLE_QT QT_FOUND QT_IS_REQUIRED) |
---|
180 | endif() |
---|
181 | |
---|
182 | find_package(ZLIB ${ZLIB_MINIMUM}) |
---|
183 | if(ZLIB_FOUND) |
---|
184 | add_definitions(-DHAVE_ZLIB) |
---|
185 | endif() |
---|
186 | |
---|
187 | set(THIRD_PARTY_DIR ${CMAKE_SOURCE_DIR}/third-party) |
---|
188 | |
---|
189 | if(WIN32) |
---|
190 | tr_add_external_auto_library(EVENT2 event |
---|
191 | PATCH_COMMAND "${CMAKE_COMMAND}" -E copy "${THIRD_PARTY_DIR}/event2.cmake" "<SOURCE_DIR>/CMakeLists.txt") |
---|
192 | else() |
---|
193 | tr_add_external_auto_library(EVENT2 event |
---|
194 | BUILD_IN_SOURCE 1 |
---|
195 | CONFIGURE_COMMAND "<SOURCE_DIR>/autogen.sh" |
---|
196 | COMMAND "<SOURCE_DIR>/configure" "--prefix=<INSTALL_DIR>" "--disable-shared") |
---|
197 | endif() |
---|
198 | |
---|
199 | tr_add_external_auto_library(NATPMP natpmp |
---|
200 | PATCH_COMMAND "${CMAKE_COMMAND}" -E copy "${THIRD_PARTY_DIR}/natpmp.cmake" "<SOURCE_DIR>/CMakeLists.txt") |
---|
201 | if(NOT USE_SYSTEM_NATPMP) |
---|
202 | set(NATPMP_DEFINITIONS -DNATPMP_STATICLIB) |
---|
203 | endif() |
---|
204 | |
---|
205 | tr_add_external_auto_library(MINIUPNPC miniupnpc |
---|
206 | PATCH_COMMAND "${CMAKE_COMMAND}" -E remove_directory "<SOURCE_DIR>/minissdpd" |
---|
207 | COMMAND "${CMAKE_COMMAND}" -E remove_directory "<SOURCE_DIR>/miniupnpc-async" |
---|
208 | COMMAND "${CMAKE_COMMAND}" -E remove_directory "<SOURCE_DIR>/miniupnpc-libevent" |
---|
209 | COMMAND "${CMAKE_COMMAND}" -E remove_directory "<SOURCE_DIR>/miniupnpd" |
---|
210 | COMMAND "${CMAKE_COMMAND}" -E remove "<SOURCE_DIR>/README" |
---|
211 | COMMAND "${CMAKE_COMMAND}" -E copy_directory "<SOURCE_DIR>/miniupnpc" "<SOURCE_DIR>" |
---|
212 | COMMAND "${CMAKE_COMMAND}" -E remove_directory "<SOURCE_DIR>/miniupnpc" |
---|
213 | CMAKE_ARGS |
---|
214 | -DUPNPC_BUILD_STATIC=ON |
---|
215 | -DUPNPC_BUILD_SHARED=OFF |
---|
216 | -DUPNPC_BUILD_TESTS=OFF) |
---|
217 | set(MINIUPNPC_DEFINITIONS -DSYSTEM_MINIUPNP) |
---|
218 | if(NOT USE_SYSTEM_MINIUPNPC) |
---|
219 | list(APPEND MINIUPNPC_DEFINITIONS -DMINIUPNP_STATICLIB) |
---|
220 | set(MINIUPNPC_VERSION 1.9) |
---|
221 | set(MINIUPNPC_API_VERSION 10) |
---|
222 | endif() |
---|
223 | |
---|
224 | tr_add_external_auto_library(DHT dht |
---|
225 | PATCH_COMMAND "${CMAKE_COMMAND}" -E copy "${THIRD_PARTY_DIR}/dht.cmake" "<SOURCE_DIR>/CMakeLists.txt") |
---|
226 | |
---|
227 | if(ENABLE_UTP) |
---|
228 | tr_add_external_auto_library(UTP utp |
---|
229 | PATCH_COMMAND "${CMAKE_COMMAND}" -E copy "${THIRD_PARTY_DIR}/utp.cmake" "<SOURCE_DIR>/CMakeLists.txt" |
---|
230 | COMMAND "${CMAKE_COMMAND}" -E copy "${THIRD_PARTY_DIR}/utp_config.h" "<SOURCE_DIR>/utp_config.h") |
---|
231 | endif() |
---|
232 | |
---|
233 | if(WITH_INOTIFY) |
---|
234 | tr_get_required_flag(WITH_INOTIFY INOTIFY_IS_REQUIRED) |
---|
235 | |
---|
236 | set(INOTIFY_FOUND OFF) |
---|
237 | check_include_file(sys/inotify.h HAVE_SYS_INOTIFY_H) |
---|
238 | check_function_exists(inotify_init HAVE_INOTIFY_INIT) |
---|
239 | if(HAVE_SYS_INOTIFY_H AND HAVE_INOTIFY_INIT) |
---|
240 | set(INOTIFY_FOUND ON) |
---|
241 | endif() |
---|
242 | |
---|
243 | tr_fixup_auto_option(WITH_INOTIFY INOTIFY_FOUND INOTIFY_IS_REQUIRED) |
---|
244 | endif() |
---|
245 | |
---|
246 | if(WITH_KQUEUE) |
---|
247 | tr_get_required_flag(WITH_KQUEUE KQUEUE_IS_REQUIRED) |
---|
248 | |
---|
249 | set(KQUEUE_FOUND OFF) |
---|
250 | check_include_files("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H) |
---|
251 | check_function_exists(kqueue HAVE_KQUEUE) |
---|
252 | if(HAVE_SYS_EVENT_H AND HAVE_KQUEUE) |
---|
253 | set(KQUEUE_FOUND ON) |
---|
254 | endif() |
---|
255 | |
---|
256 | tr_fixup_auto_option(WITH_KQUEUE KQUEUE_FOUND KQUEUE_IS_REQUIRED) |
---|
257 | endif() |
---|
258 | |
---|
259 | if(WITH_SYSTEMD) |
---|
260 | tr_get_required_flag(WITH_SYSTEMD SYSTEMD_IS_REQUIRED) |
---|
261 | |
---|
262 | pkg_check_modules(SYSTEMD_DAEMON ${SYSTEMD_IS_REQUIRED} libsystemd-daemon) |
---|
263 | |
---|
264 | tr_fixup_auto_option(WITH_SYSTEMD SYSTEMD_DAEMON_FOUND SYSTEMD_IS_REQUIRED) |
---|
265 | endif() |
---|
266 | |
---|
267 | include_directories(${CMAKE_BINARY_DIR}) |
---|
268 | |
---|
269 | if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang") |
---|
270 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") |
---|
271 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") |
---|
272 | |
---|
273 | set(NEEDED_COMPILER_FLAGS |
---|
274 | -Wall |
---|
275 | -W |
---|
276 | -Wcast-align |
---|
277 | -Wfloat-equal |
---|
278 | -Wformat-security |
---|
279 | -Wmissing-format-attribute |
---|
280 | -Wpointer-arith |
---|
281 | -Wredundant-decls |
---|
282 | -Wundef |
---|
283 | -Wunused-parameter |
---|
284 | -Wwrite-strings) |
---|
285 | |
---|
286 | if(NOT CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_VERSION VERSION_GREATER "3.3") |
---|
287 | list(APPEND NEEDED_COMPILER_FLAGS |
---|
288 | -Wextra |
---|
289 | -Winit-self) |
---|
290 | endif() |
---|
291 | |
---|
292 | set(NEEDED_C_COMPILER_FLAGS |
---|
293 | ${NEEDED_COMPILER_FLAGS} |
---|
294 | -Winline |
---|
295 | -Wmissing-declarations |
---|
296 | -Wnested-externs |
---|
297 | -Wstrict-prototypes) |
---|
298 | string(REPLACE ";" " " NEEDED_C_COMPILER_FLAGS_STRING "${NEEDED_C_COMPILER_FLAGS}") |
---|
299 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${NEEDED_C_COMPILER_FLAGS_STRING}") |
---|
300 | |
---|
301 | set(NEEDED_CXX_COMPILER_FLAGS |
---|
302 | ${NEEDED_COMPILER_FLAGS}) |
---|
303 | string(REPLACE ";" " " NEEDED_CXX_COMPILER_FLAGS_STRING "${NEEDED_CXX_COMPILER_FLAGS}") |
---|
304 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NEEDED_CXX_COMPILER_FLAGS_STRING}") |
---|
305 | endif() |
---|
306 | |
---|
307 | set(NEEDED_HEADERS |
---|
308 | stdbool.h |
---|
309 | sys/statvfs.h |
---|
310 | xfs/xfs.h) |
---|
311 | |
---|
312 | if(ENABLE_NLS) |
---|
313 | list(APPEND NEEDED_HEADERS libintl.h) |
---|
314 | endif() |
---|
315 | |
---|
316 | foreach(H ${NEEDED_HEADERS}) |
---|
317 | tr_make_id("${H}" H_ID) |
---|
318 | check_include_file(${H} HAVE_${H_ID}) |
---|
319 | if(HAVE_${H_ID}) |
---|
320 | add_definitions(-DHAVE_${H_ID}) |
---|
321 | endif() |
---|
322 | endforeach() |
---|
323 | |
---|
324 | set(NEEDED_FUNCTIONS |
---|
325 | canonicalize_file_name |
---|
326 | daemon |
---|
327 | fallocate64 |
---|
328 | getmntent |
---|
329 | getpagesize |
---|
330 | htonll |
---|
331 | iconv_open |
---|
332 | localtime_r |
---|
333 | memmem |
---|
334 | mkdtemp |
---|
335 | ntohll |
---|
336 | posix_fadvise |
---|
337 | posix_fallocate |
---|
338 | posix_memalign |
---|
339 | pread |
---|
340 | pwrite |
---|
341 | statvfs |
---|
342 | strlcpy |
---|
343 | strsep |
---|
344 | syslog |
---|
345 | valloc) |
---|
346 | |
---|
347 | foreach(F ${NEEDED_FUNCTIONS}) |
---|
348 | tr_make_id("${F}" F_ID) |
---|
349 | check_function_exists(${F} HAVE_${F_ID}) |
---|
350 | if(HAVE_${F_ID}) |
---|
351 | add_definitions(-DHAVE_${F_ID}) |
---|
352 | endif() |
---|
353 | endforeach() |
---|
354 | |
---|
355 | # if(MINGW) |
---|
356 | # check_function_exists(__mingw_printf HAVE_MINGW_PRINTF) |
---|
357 | # if(HAVE_MINGW_PRINTF) |
---|
358 | # add_definitions(-D__USE_MINGW_ANSI_STDIO=1 -D__STDC_FORMAT_MACROS=1) |
---|
359 | # endif() |
---|
360 | # endif() |
---|
361 | |
---|
362 | if(ENABLE_NLS) |
---|
363 | check_library_exists(intl libintl_gettext "" HAVE_LIBINTL) |
---|
364 | if(HAVE_LIBINTL) |
---|
365 | set(LIBINTL_LIBRARY intl) |
---|
366 | endif() |
---|
367 | endif() |
---|
368 | |
---|
369 | check_library_exists(m sqrt "" HAVE_LIBM) |
---|
370 | if(HAVE_LIBM) |
---|
371 | set(LIBM_LIBRARY m) |
---|
372 | endif() |
---|
373 | |
---|
374 | if(ENABLE_TESTS) |
---|
375 | enable_testing() |
---|
376 | include(CTest) |
---|
377 | endif() |
---|
378 | |
---|
379 | add_subdirectory(libtransmission) |
---|
380 | |
---|
381 | foreach(P daemon cli utils gtk qt) |
---|
382 | string(TOUPPER "${P}" P_ID) |
---|
383 | if(ENABLE_${P_ID}) |
---|
384 | add_subdirectory(${P}) |
---|
385 | endif() |
---|
386 | endforeach() |
---|
387 | |
---|
388 | if(ENABLE_DAEMON OR ENABLE_GTK OR ENABLE_QT) |
---|
389 | install(DIRECTORY web DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${TR_NAME} |
---|
390 | PATTERN *.am EXCLUDE |
---|
391 | PATTERN *.scss EXCLUDE) |
---|
392 | endif() |
---|
393 | |
---|
394 | if(ENABLE_GTK AND ENABLE_NLS) |
---|
395 | find_package(Gettext REQUIRED) |
---|
396 | add_subdirectory(po) |
---|
397 | endif() |
---|
398 | |
---|
399 | if(INSTALL_DOC) |
---|
400 | install(FILES AUTHORS COPYING NEWS README extras/rpc-spec.txt extras/send-email-when-torrent-done.sh DESTINATION ${CMAKE_INSTALL_DOCDIR}) |
---|
401 | endif() |
---|
402 | |
---|
403 | set(CPACK_SOURCE_GENERATOR TBZ2) |
---|
404 | set(CPACK_SOURCE_PACKAGE_FILE_NAME "${TR_NAME}-${TR_USER_AGENT_PREFIX}") |
---|
405 | set(CPACK_SOURCE_IGNORE_FILES |
---|
406 | \\\\.svn |
---|
407 | ) |
---|
408 | |
---|
409 | include(CPack) |
---|