-
Notifications
You must be signed in to change notification settings - Fork 20
/
CMakeLists.txt
694 lines (610 loc) · 18.6 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
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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
project(fatrat)
cmake_minimum_required(VERSION 2.8.11 FATAL_ERROR)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
INCLUDE(CheckFunctionExists)
INCLUDE(CheckIncludeFiles)
INCLUDE(FindPkgConfig)
INCLUDE(FindBoost)
#INCLUDE(FindJNI)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(Qt5Core REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Svg REQUIRED)
find_package(Qt5DBus REQUIRED)
find_package(Qt5Network REQUIRED)
find_package(Qt5Xml REQUIRED)
find_package(Qt5LinguistTools REQUIRED)
message(STATUS "XML: ${Qt5Xml_INCLUDE_DIRS}")
include_directories(${Qt5Widgets_INCLUDE_DIRS} ${Qt5Xml_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS} ${Qt5Svg_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
ADD_DEFINITIONS(-DBOOST_FILESYSTEM_NARROW_ONLY)
ADD_CUSTOM_TARGET(uninstall
COMMAND ${CMAKE_COMMAND} -E echo Use 'xargs rm < install_manifest.txt' to uninstall this program
)
IF(NOT DEFINED CMAKE_INSTALL_LIBDIR)
SET(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib")
ENDIF(NOT DEFINED CMAKE_INSTALL_LIBDIR)
#set(WITH_CXX0X ON)
if(WITH_EVERYTHING)
set(WITH_BITTORRENT ON)
set(WITH_JABBER ON)
set(WITH_NLS ON)
set(WITH_DOCUMENTATION ON)
set(WITH_WEBINTERFACE ON)
set(WITH_CURL ON)
set(WITH_JPLUGINS ON)
endif(WITH_EVERYTHING)
ADD_DEFINITIONS(-std=c++11)
if(WITH_JPLUGINS)
set(WITH_CURL ON)
INCLUDE(FindJNI)
find_package(JNI REQUIRED)
include_directories(${JNI_INCLUDE_DIRS})
endif(WITH_JPLUGINS)
if(WITH_BITTORRENT)
pkg_check_modules(libtorrent REQUIRED "libtorrent-rasterbar >= 1.1.0")
if(libtorrent_FOUND)
message(STATUS "libtorrent ${libtorrent_VERSION} found OK")
include_directories(${libtorrent_INCLUDE_DIRS})
set(LIBTORRENT_0_15 TRUE)
#if(libtorrent_VERSION GREATER 1.0.99)
# set(LIBTORRENT_1_1 TRUE)
#endif(libtorrent_VERSION GREATER 0.14.99)
else(libtorrent_FOUND)
message(FATAL_ERROR "No Rasterbar libtorrent found")
endif(libtorrent_FOUND)
SET(Boost_USE_MULTITHREAD ON)
SET(Boost_USE_STATIC_LIBS OFF)
find_package(Boost COMPONENTS date_time REQUIRED)
if(Boost_FOUND)
message(STATUS "boost-datetime found OK")
include_directories(${Boost_INCLUDE_DIRS})
else(Boost_FOUND)
message(FATAL_ERROR "No boost-datetime found")
endif(Boost_FOUND)
#set(asio_DIR ${CMAKE_MODULE_PATH})
#find_package(asio REQUIRED)
#if(ASIO_FOUND)
# message(STATUS "asio found OK ${ASIO_INCLUDE_DIRS}")
# include_directories(${ASIO_INCLUDE_DIRS})
#else(ASIO_FOUND)
# message(FATAL_ERROR "No Boost asio")
#endif(ASIO_FOUND)
find_package(Qt5WebEngine)
find_package(Qt5WebEngineWidgets)
if (Qt5WebEngine_FOUND)
set(HAVE_WEBENGINE TRUE)
set(QT_LIBRARIES ${QT_LIBRAIRES} Qt5::WebEngine Qt5::WebEngineWidgets)
else(Qt5WebEngine_FOUND)
message(WARNING "Qt WebEngine not found, BitTorrent search not available")
endif (Qt5WebEngine_FOUND)
include_directories(${Qt5WebEngine_INCLUDE_DIRS})
ADD_DEFINITIONS(-DTORRENT_USE_OPENSSL)
endif(WITH_BITTORRENT)
if(WITH_JABBER)
pkg_check_modules(gloox REQUIRED "gloox >= 0.9.0.0")
if(gloox_FOUND)
message(STATUS "gloox ${gloox_VERSION} found OK")
include_directories(${gloox_INCLUDE_DIRS})
if(gloox_VERSION LESS 1.0)
set(GLOOX_0_9 TRUE)
else(gloox_VERSION LESS 1.0)
set(GLOOX_1_0 TRUE)
endif(gloox_VERSION LESS 1.0)
else(gloox_FOUND)
message(FATAL_ERROR "No libgloox found")
endif(gloox_FOUND)
endif(WITH_JABBER)
if(WITH_CURL)
pkg_check_modules(curl REQUIRED "libcurl >= 7.18.2")
if(curl_FOUND)
include_directories(${curl_INCLUDE_DIRS})
else(curl_FOUND)
message(FATAR_ERROR "No libcurl found")
endif(curl_FOUND)
endif(WITH_CURL)
if(CMAKE_BUILD_TYPE MATCHES Debug)
ADD_DEFINITIONS(-ggdb)
ADD_DEFINITIONS(-DDEBUG_BUILD)
ADD_DEFINITIONS(-DNDEBUG)
ADD_DEFINITIONS(-Wall)
else(CMAKE_BUILD_TYPE MATCHES Debug)
ADD_DEFINITIONS(-ggdb)
ADD_DEFINITIONS(-DNDEBUG)
ADD_DEFINITIONS(-Wall)
endif(CMAKE_BUILD_TYPE MATCHES Debug)
CHECK_INCLUDE_FILES(sys/epoll.h HAVE_SYS_EPOLL_H)
CHECK_FUNCTION_EXISTS(kqueue HAVE_KQUEUE)
CONFIGURE_FILE(config.h.in config.h)
if(WITH_DOCUMENTATION)
find_package(Qt5Help REQUIRED)
set(QT_LIBRARIES ${QT_LIBRARIES} Qt5::Help)
endif(WITH_DOCUMENTATION)
if(WITH_WEBINTERFACE)
pkg_check_modules(pion REQUIRED "pion >= 5.0.0")
if(pion_FOUND)
include_directories(${pion_INCLUDE_DIRS})
#message(STATUS "Pion libdir: ${pion-net_LIBDIR}")
#FILE(GLOB pion_FileService "${pion-net_LIBDIR}/pion/plugins/FileService.*")
#if(pion_FileService MATCHES "^$")
# message(FATAL_ERROR "Pion-net FileService plugin not found (libpion-net-plugins?) - ${pion_FileService}")
#endif(pion_FileService MATCHES "^$")
else(pion_FOUND)
message(FATAL_ERROR "No pion library found")
endif(pion_FOUND)
endif(WITH_WEBINTERFACE)
#set(CMAKE_REQUIRED_INCLUDES "sys/types.h")
CHECK_INCLUDE_FILES("sys/types.h;attr/xattr.h" HAVE_XATTR_H)
if (HAVE_XATTR_H)
SET(XATTR_LIBRARIES "-lattr")
endif (HAVE_XATTR_H)
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
set(fatrat_SRCS
src/MyApplication.cpp
src/Auth.cpp
src/AboutDlg.cpp
src/AppTools.cpp
src/DelayedIcon.cpp
src/DropBox.cpp
src/fatrat.cpp
src/Proxy.cpp
src/InfoBar.cpp
src/MainTab.cpp
src/MainWindow.cpp
src/NetIface.cpp
src/NewTransferDlg.cpp
src/Queue.cpp
src/QueueMgr.cpp
src/QueueView.cpp
src/SettingsDlg.cpp
src/SettingsGeneralForm.cpp
src/SettingsNetworkForm.cpp
src/SettingsQueueForm.cpp
src/SettingsSchedulerForm.cpp
src/ScheduledActionDlg.cpp
src/SimpleEmail.cpp
src/SpeedGraph.cpp
src/SpeedLimitWidget.cpp
src/StatsWidget.cpp
src/Transfer.cpp
src/TransfersModel.cpp
src/Logger.cpp
src/XmlRpc.cpp
src/Scheduler.cpp
src/MyFileDialog.cpp
src/Settings.cpp
src/QueueDlg.cpp
src/ClipboardMonitor.cpp
src/SettingsClipboardMonitorForm.cpp
src/TransferFactory.cpp
src/filterlineedit.cpp
src/fancylineedit.cpp
#src/notify/Notification.cpp
src/dbus/NotificationsProxy.cpp
src/dbus/KNotify.cpp
src/engines/MetalinkSettings.cpp
src/engines/PlaceholderTransfer.cpp
src/poller/Poller.cpp
src/captcha/Captcha.cpp
src/captcha/CaptchaQt.cpp
src/captcha/CaptchaQtDlg.cpp
src/rss/RssFetcher.cpp
src/rss/SettingsRssForm.cpp
src/rss/RssRegexpDlg.cpp
src/rss/RssDownloadedDlg.cpp
src/tooltips/BaseToolTip.cpp
src/tooltips/QueueToolTip.cpp
src/tooltips/TrayToolTip.cpp
src/dbus/DbusAdaptor.cpp
src/dbus/DbusImpl.cpp
src/tools/HashDlg.cpp
src/util/ExtendedAttributes.cpp
src/util/BalloonTip.cpp
)
if(HAVE_SYS_EPOLL_H)
set(POSIX_LINUX TRUE)
set(fatrat_SRCS ${fatrat_SRCS} src/poller/EpollPoller.cpp)
elseif(HAVE_KQUEUE)
set(POSIX_BSD TRUE)
set(fatrat_SRCS ${fatrat_SRCS} src/poller/KqueuePoller.cpp)
endif(HAVE_SYS_EPOLL_H)
set(fatrat_MOC_HDRS
src/dbus/DbusAdaptor.h
src/dbus/DbusImpl.h
src/TransfersModel.h
src/QueueDlg.h
src/QueueMgr.h
src/SpeedGraph.h
src/SettingsDropBoxForm.h
src/SettingsNetworkForm.h
src/SettingsQueueForm.h
src/SettingsSchedulerForm.h
src/ScheduledActionDlg.h
src/StatsWidget.h
src/ProxyDlg.h
src/SpeedLimitWidget.h
src/LogManager.h
src/SettingsGeneralForm.h
src/Transfer.h
src/Scheduler.h
src/SimpleEmail.h
src/QueueView.h
src/MainWindow.h
src/AboutDlg.h
src/SettingsDlg.h
src/TransfersView.h
src/Queue.h
src/MainTab.h
src/DropBox.h
src/InfoBar.h
src/GenericOptsForm.h
src/WidgetHostDlg.h
src/UserAuthDlg.h
src/NewTransferDlg.h
src/Logger.h
src/MyApplication.h
src/ClipboardMonitor.h
src/SettingsClipboardMonitorForm.h
src/TransferFactory.h
src/filterlineedit.h
src/fancylineedit.h
src/ClickableLabel.h
#src/notify/Notification.h
src/dbus/NotificationsProxy.h
src/dbus/KNotify.h
src/engines/MetalinkSettings.h
src/captcha/CaptchaQt.h
src/captcha/CaptchaQtDlg.h
src/tools/HashDlg.h
src/rss/RssFetcher.h
src/rss/SettingsRssForm.h
src/rss/RssFeedDlg.h
src/rss/RssRegexpDlg.h
src/rss/RssDownloadedDlg.h
src/tooltips/QueueToolTip.h
src/tooltips/TrayToolTip.h
src/tooltips/BaseToolTip.h
src/util/BalloonTip.h
)
set(fatrat_UIS
src/AboutDlg.ui
src/AutoActionForm.ui
src/CommentForm.ui
src/GenericOptsForm.ui
src/MainWindow.ui
src/NewTransferDlg.ui
src/ProxyDlg.ui
src/QueueDlg.ui
src/SettingsDlg.ui
src/SettingsDropBoxForm.ui
src/SettingsGeneralForm.ui
src/SettingsNetworkForm.ui
src/SettingsQueueForm.ui
src/SettingsSchedulerForm.ui
src/SettingsClipboardMonitorForm.ui
src/ScheduledActionDlg.ui
src/SpeedLimitWidget.ui
src/UserAuthDlg.ui
src/WidgetHostDlg.ui
src/captcha/CaptchaQtDlg.ui
src/tools/HashDlg.ui
src/rss/SettingsRssForm.ui
src/rss/RssFeedDlg.ui
src/rss/RssRegexpDlg.ui
src/rss/RssDownloadedDlg.ui
src/rss/RssEpisodeNameDlg.ui
src/engines/FtpUploadOptsForm.ui
src/engines/HttpOptsWidget.ui
src/engines/HttpUrlOptsDlg.ui
src/engines/SettingsHttpForm.ui
src/engines/SettingsMetalinkForm.ui
)
if(WITH_CURL)
set(fatrat_SRCS
${fatrat_SRCS}
src/engines/CurlDownload.cpp
src/engines/CurlUpload.cpp
src/engines/CurlPoller.cpp
src/engines/CurlUser.cpp
src/engines/CurlStat.cpp
src/engines/CurlPollingMaster.cpp
src/engines/UrlClient.cpp
src/engines/GeneralDownloadForms.cpp
src/engines/HttpFtpSettings.cpp
src/engines/HttpDetails.cpp
src/engines/HttpDetailsBar.cpp
src/engines/HttpMirrorsDlg.cpp
src/engines/MetalinkDownload.cpp
)
set(fatrat_MOC_HDRS
${fatrat_MOC_HDRS}
src/engines/CurlDownload.h
src/engines/CurlUpload.h
src/engines/UrlClient.h
src/engines/HttpFtpSettings.h
src/engines/HttpDetails.h
src/engines/HttpDetailsBar.h
src/engines/HttpMirrorsDlg.h
src/engines/GeneralDownloadForms.h
src/engines/MetalinkDownload.h
)
set(fatrat_UIS
${fatrat_UIS}
src/engines/HttpDetails.ui
src/engines/HttpMirrorsDlg.ui
)
endif(WITH_CURL)
if(WITH_JPLUGINS)
set(fatrat_SRCS
${fatrat_SRCS}
src/java/JString.cpp
src/java/JClass.cpp
src/java/JObject.cpp
src/java/JArray.cpp
src/java/JScope.cpp
src/java/JException.cpp
src/java/JValue.cpp
src/java/JSignature.cpp
src/java/JByteBuffer.cpp
src/java/JMap.cpp
src/java/JVM.cpp
src/java/JPlugin.cpp
src/java/JExtractorPlugin.cpp
src/java/JTransferPlugin.cpp
src/java/JDownloadPlugin.cpp
src/java/JUploadPlugin.cpp
src/java/JLinkCheckerPlugin.cpp
src/java/JNativeMethod.cpp
src/java/JSettings.cpp
src/java/JBackgroundWorker.cpp
src/java/JSingleCObject.cpp
src/java/JAccountStatusPlugin.cpp
src/engines/JavaAccountStatusWidget.cpp
src/engines/ExtensionDownloadDlg.cpp
src/engines/JavaPersistentVariables.cpp
src/engines/JavaDownload.cpp
src/engines/JavaExtractor.cpp
src/engines/JavaUpload.cpp
src/engines/SettingsJavaPluginForm.cpp
src/ExtensionMgr.cpp
src/java/JSearchPlugin.cpp
src/tools/FileSharingSearch.cpp
)
set(fatrat_MOC_HDRS
${fatrat_MOC_HDRS}
src/engines/JavaDownload.h
src/engines/JavaExtractor.h
src/engines/JavaUpload.h
src/java/JPlugin.h
src/java/JTransferPlugin.h
src/java/JDownloadPlugin.h
src/java/JAccountStatusPlugin.h
src/java/JLinkCheckerPlugin.h
src/engines/JavaAccountStatusWidget.h
src/engines/ExtensionDownloadDlg.h
src/engines/SettingsJavaPluginForm.h
src/java/JBackgroundWorker.h
src/ExtensionMgr.h
src/tools/FileSharingSearch.h
)
set(fatrat_UIS
${fatrat_UIS}
src/engines/ExtensionDownloadDlg.ui
src/engines/JavaDownloadOptsForm.ui
src/engines/SettingsJavaPluginForm.ui
src/engines/JavaAccountStatusWidget.ui
src/tools/FileSharingSearch.ui
)
endif(WITH_JPLUGINS)
if(WITH_BITTORRENT)
set(fatrat_SRCS
${fatrat_SRCS}
src/engines/TorrentDetails.cpp
src/engines/TorrentDownload.cpp
src/engines/TorrentFilesModel.cpp
src/engines/TorrentOptsWidget.cpp
src/engines/TorrentIPFilter.cpp
src/engines/TorrentPeersModel.cpp
src/engines/TorrentPiecesModel.cpp
src/engines/TorrentProgressWidget.cpp
src/engines/TorrentSettings.cpp
src/tools/CreateTorrentDlg.cpp
src/tools/ContextListWidget.cpp
)
set(fatrat_MOC_HDRS
${fatrat_MOC_HDRS}
src/tools/CreateTorrentDlg.h
src/tools/ContextListWidget.h
src/engines/TorrentDetails.h
src/engines/TorrentPeersModel.h
src/engines/TorrentDownload.h
src/engines/TorrentOptsWidget.h
src/engines/TorrentProgressWidget.h
src/engines/TorrentPiecesModel.h
src/engines/TorrentFilesModel.h
src/engines/TorrentSettings.h
)
set(fatrat_UIS
${fatrat_UIS}
src/tools/CreateTorrentDlg.ui
src/engines/TorrentDetailsForm.ui
src/engines/TorrentOptsWidget.ui
src/engines/SettingsTorrentForm.ui
)
if (HAVE_WEBENGINE)
set(fatrat_SRCS
${fatrat_SRCS}
src/tools/TorrentSearch.cpp
src/tools/TorrentWebView.cpp
)
set(fatrat_MOC_HDRS
${fatrat_MOC_HDRS}
src/tools/TorrentSearch.h
src/tools/TorrentWebView.h
)
set(fatrat_UIS
${fatrat_UIS}
src/tools/TorrentSearch.ui
src/tools/TorrentWebView.ui
)
endif (HAVE_WEBENGINE)
endif(WITH_BITTORRENT)
if(WITH_JABBER)
set(fatrat_SRCS
${fatrat_SRCS}
src/remote/JabberService.cpp
src/remote/SettingsJabberForm.cpp
)
set(fatrat_MOC_HDRS
${fatrat_MOC_HDRS}
src/remote/JabberService.h
src/remote/SettingsJabberForm.h
)
set(fatrat_UIS
${fatrat_UIS}
src/remote/SettingsJabberForm.ui
)
endif(WITH_JABBER)
if(WITH_WEBINTERFACE)
set(fatrat_SRCS
${fatrat_SRCS}
src/remote/HttpService.cpp
src/remote/SettingsWebForm.cpp
src/remote/XmlRpcService.cpp
src/remote/pion/FileService.cpp
src/remote/CertGenDlg.cpp
src/captcha/CaptchaHttp.cpp
)
set(fatrat_MOC_HDRS
${fatrat_MOC_HDRS}
src/remote/XmlRpcService.h
src/remote/SettingsWebForm.h
src/remote/CertGenDlg.h
src/remote/HttpService.h
src/captcha/CaptchaHttp.h
)
set(fatrat_UIS
${fatrat_UIS}
src/remote/SettingsWebForm.ui
src/remote/CertGenDlg.ui
)
endif(WITH_WEBINTERFACE)
if(WITH_DOCUMENTATION)
set(fatrat_SRCS
${fatrat_SRCS}
src/tools/HelpBrowser.cpp
src/tools/HelpTextBrowser.cpp
)
set(fatrat_MOC_HDRS
${fatrat_MOC_HDRS}
src/tools/HelpBrowser.h
)
set(fatrat_UIS
${fatrat_UIS}
src/tools/HelpBrowser.ui
)
endif(WITH_DOCUMENTATION)
qt5_wrap_cpp(fatrat_MOC_SRCS ${fatrat_MOC_HDRS})
set(fatrat_RCS
gfx/resources.qrc
)
qt5_wrap_ui(fatrat_UIS_H ${fatrat_UIS})
qt5_add_resources(fatrat_QRC_H gfx/resources.qrc)
qt5_add_translation(lrelease_outputs locale/fatrat_cs_CZ.ts
locale/fatrat_pl_PL.ts locale/fatrat_tr_TR.ts locale/fatrat_sk_SK.ts locale/fatrat_ru_RU.ts locale/fatrat_fr_FR.ts
locale/fatrat_uk_UA.ts locale/fatrat_es_AR.ts locale/fatrat_es_ES.ts locale/fatrat_ca_ES.ts locale/fatrat_zh_CN.ts
locale/fatrat_zh_TW.ts locale/fatrat_sr_RS.ts locale/fatrat_sr_BA.ts locale/fatrat_de_DE.ts)
add_executable(fatrat ${fatrat_SRCS} ${fatrat_MOC_SRCS} ${fatrat_UIS_H}
${fatrat_QRC_H} ${lrelease_outputs})
add_executable(fatrat-conf src/fatrat-conf.cpp)
# This used to be a workaround until it started causing the exact opposite... oh dear!
#STRING(REPLACE "-mt" "" pion-net_LIBRARIES "${pion-net_LIBRARIES}")
#message(STATUS ${pion-net_LIBRARIES})
if (POSIX_LINUX)
set (DL_LDFLAGS "-ldl")
endif (POSIX_LINUX)
message(STATUS "Pion: ${pion_LIBRARIES}")
target_link_libraries(fatrat ${DL_LDFLAGS} -lpthread ${QT_LIBRARIES}
Qt5::Widgets Qt5::Svg Qt5::Network Qt5::DBus Qt5::Xml
${libtorrent_LDFLAGS} ${gloox_LDFLAGS} ${curl_LDFLAGS} ${Boost_LIBRARIES}
${pion_LIBRARIES} ${XATTR_LIBRARIES} crypto -export-dynamic)
target_link_libraries(fatrat-conf Qt5::Core)
set(fatrat_DEV_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/src/fatrat.h
${CMAKE_CURRENT_BINARY_DIR}/config.h
${CMAKE_CURRENT_SOURCE_DIR}/src/DelayedIcon.h
${CMAKE_CURRENT_SOURCE_DIR}/src/AppTools.h
${CMAKE_CURRENT_SOURCE_DIR}/src/Transfer.h
${CMAKE_CURRENT_SOURCE_DIR}/src/WidgetHostChild.h
${CMAKE_CURRENT_SOURCE_DIR}/src/WidgetHostDlg.h
${CMAKE_CURRENT_SOURCE_DIR}/src/Queue.h
${CMAKE_CURRENT_SOURCE_DIR}/src/Logger.h
${CMAKE_CURRENT_SOURCE_DIR}/src/RuntimeException.h
${CMAKE_CURRENT_SOURCE_DIR}/src/Settings.h
${CMAKE_CURRENT_SOURCE_DIR}/src/Auth.h
${CMAKE_CURRENT_SOURCE_DIR}/src/Proxy.h
${CMAKE_CURRENT_SOURCE_DIR}/src/XmlRpc.h
)
set(fatrat_DEV_HEADERS_ENGINES
${CMAKE_CURRENT_SOURCE_DIR}/src/engines/CurlDownload.h
${CMAKE_CURRENT_SOURCE_DIR}/src/engines/CurlUser.h
${CMAKE_CURRENT_SOURCE_DIR}/src/engines/CurlPoller.h
${CMAKE_CURRENT_SOURCE_DIR}/src/engines/CurlStat.h
${CMAKE_CURRENT_SOURCE_DIR}/src/engines/UrlClient.h
)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/LICENSE
${CMAKE_CURRENT_SOURCE_DIR}/TRANSLATIONS
${CMAKE_CURRENT_SOURCE_DIR}/README
${CMAKE_CURRENT_SOURCE_DIR}/AUTHORS
${CMAKE_CURRENT_SOURCE_DIR}/INSTALL
DESTINATION share/fatrat
)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/data/defaults.conf
DESTINATION share/fatrat/data
)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/css/queueview.css ${CMAKE_CURRENT_SOURCE_DIR}/data/css/label-headers.css DESTINATION share/fatrat/data/css)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/gfx/fatrat.png DESTINATION share/pixmaps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/fatrat.desktop DESTINATION share/applications)
install(FILES ${fatrat_DEV_HEADERS} DESTINATION include/fatrat)
install(FILES ${fatrat_DEV_HEADERS_ENGINES} DESTINATION include/fatrat/engines)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/poller/Poller.h DESTINATION include/fatrat/poller)
if(WITH_NLS)
install(FILES ${lrelease_outputs} DESTINATION share/fatrat/lang)
endif(WITH_NLS)
if(WITH_CURL)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/mirrors.txt DESTINATION share/fatrat/data)
endif(WITH_CURL)
if(WITH_BITTORRENT)
FILE( GLOB btsearch ${CMAKE_CURRENT_SOURCE_DIR}/data/btsearch/*.xml )
install(FILES ${btsearch} DESTINATION share/fatrat/data/btsearch)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/btlinks.txt DESTINATION share/fatrat/data)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/bttrackers.txt DESTINATION share/fatrat/data)
endif(WITH_BITTORRENT)
if(WITH_WEBINTERFACE)
#FILE( GLOB_RECURSE remfiles ${CMAKE_CURRENT_SOURCE_DIR}/data/remote/* )
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/remote DESTINATION share/fatrat/data)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/genssl.cnf DESTINATION share/fatrat/data)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/genssl.sh DESTINATION share/fatrat/data PERMISSIONS
OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif(WITH_WEBINTERFACE)
if(WITH_JPLUGINS)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/java/findjvm.sh DESTINATION share/fatrat/data/java PERMISSIONS
OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/java/extension.policy DESTINATION share/fatrat/data/java)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/java/libs DESTINATION share/fatrat/data/java)
endif(WITH_JPLUGINS)
if(WITH_DOCUMENTATION)
execute_process(COMMAND qcollectiongenerator
${CMAKE_CURRENT_SOURCE_DIR}/doc/fatrat.qhcp -o
${CMAKE_CURRENT_SOURCE_DIR}/doc/fatrat.qhc)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/doc/fatrat.qhc DESTINATION share/fatrat/doc)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/doc/fatrat.qch DESTINATION share/fatrat/doc)
endif(WITH_DOCUMENTATION)
install(FILES doc/fatrat.1 DESTINATION share/man/man1)
install(TARGETS fatrat fatrat-conf DESTINATION bin)
# install(SCRIPT CreateSymlinks.cmake)