Changeset View
Changeset View
Standalone View
Standalone View
ktorrent-5.1.1/plugins/infowidget/CMakeLists.txt
1 | # Add an option to compile & link against system GeoIP (off by default) | 1 | find_package(Maxminddb) | ||
---|---|---|---|---|---|
2 | option(WITH_SYSTEM_GEOIP | 2 | set_package_properties(Maxminddb | ||
3 | "Link InfoWidget plugin against system GeoIP library and use system-wide default GeoIP Country database" | 3 | PROPERTIES | ||
4 | OFF) | 4 | TYPE OPTIONAL | ||
5 | 5 | PURPOSE "Required for lookup of countries of peer IPs") | |||
6 | if (WITH_SYSTEM_GEOIP) | 6 | if(Maxminddb_FOUND) | ||
7 | find_path(GEOIP_INCLUDE_DIR NAMES GeoIP.h PATHS / ${INCLUDE_INSTALL_DIR}/) | 7 | add_definitions(-DHAVE_MAXMINDDB) | ||
8 | find_library(GEOIP_LIBRARY NAMES GeoIP PATHS ${KDE4_LIB_DIR} ${LIB_INSTALL_DIR}) | 8 | endif() | ||
9 | | ||||
10 | if (NOT GEOIP_INCLUDE_DIR OR NOT GEOIP_LIBRARY) | | |||
11 | set(WITH_SYSTEM_GEOIP OFF CACHE BOOL | | |||
12 | "GeoIP development files could not be found on this system. Forcing this option to OFF" | | |||
13 | FORCE) | | |||
14 | message(SEND_ERROR | | |||
15 | "GeoIP library development files could not be found on your system. Embedding a local copy of GeoIP instead") | | |||
16 | endif(NOT GEOIP_INCLUDE_DIR OR NOT GEOIP_LIBRARY) | | |||
17 | endif(WITH_SYSTEM_GEOIP) | | |||
18 | | ||||
19 | if (WITH_SYSTEM_GEOIP) | | |||
20 | message(STATUS " Linking InfoWidget against system GeoIP library") | | |||
21 | add_definitions( -DUSE_SYSTEM_GEOIP ) | | |||
22 | include_directories(GEOIP_INCLUDE_DIR) | | |||
23 | set(geoip_link ${GEOIP_LIBRARY}) | | |||
24 | else(WITH_SYSTEM_GEOIP) | | |||
25 | message(STATUS " Compiling GeoIP support directly into InfoWidget plugin") | | |||
26 | set(geoip_src GeoIP.c) | | |||
27 | endif(WITH_SYSTEM_GEOIP) | | |||
28 | 9 | | |||
29 | set(ktinfowidgetplugin_SRC | 10 | set(ktinfowidgetplugin_SRC | ||
30 | infowidgetplugin.cpp | 11 | infowidgetplugin.cpp | ||
Context not available. | |||||
41 | trackerview.cpp | 22 | trackerview.cpp | ||
42 | trackermodel.cpp | 23 | trackermodel.cpp | ||
43 | addtrackersdialog.cpp | 24 | addtrackersdialog.cpp | ||
44 | ${geoip_src} | | |||
45 | geoipmanager.cpp | 25 | geoipmanager.cpp | ||
46 | flagdb.cpp | 26 | flagdb.cpp | ||
47 | iwfiletreemodel.cpp | 27 | iwfiletreemodel.cpp | ||
Context not available. | |||||
64 | KF5::KIOFileWidgets | 44 | KF5::KIOFileWidgets | ||
65 | KF5::KIOWidgets | 45 | KF5::KIOWidgets | ||
66 | KF5::WidgetsAddons | 46 | KF5::WidgetsAddons | ||
67 | ${geoip_link} | 47 | KF5::Archive | ||
48 | Maxminddb::Maxminddb | ||||
68 | ) | 49 | ) | ||
69 | install(TARGETS ktorrent_infowidget DESTINATION ${KTORRENT_PLUGIN_INSTALL_DIR} ) | 50 | install(TARGETS ktorrent_infowidget DESTINATION ${KTORRENT_PLUGIN_INSTALL_DIR} ) | ||
70 | 51 | | |||
Context not available. |