1 if (UNIX AND (NOT APPLE) AND (NOT CYGWIN))
2 find_package(LibtorrentRasterbar QUIET ${requiredLibtorrentVersion} COMPONENTS torrent-rasterbar)
3 if (NOT LibtorrentRasterbar_FOUND)
5 pkg_check_modules(LIBTORRENT_RASTERBAR IMPORTED_TARGET GLOBAL "libtorrent-rasterbar>=${requiredLibtorrentVersion}")
6 if (NOT LIBTORRENT_RASTERBAR_FOUND)
9 "Package LibtorrentRasterbar >= ${requiredLibtorrentVersion} not found"
10 " with CMake or pkg-config.\n- Set LibtorrentRasterbar_DIR to a directory containing"
11 " a LibtorrentRasterbarConfig.cmake file or add the installation prefix of LibtorrentRasterbar"
12 " to CMAKE_PREFIX_PATH.\n- Alternatively, make sure there is a valid libtorrent-rasterbar.pc"
13 " file in your system's pkg-config search paths (use the system environment variable PKG_CONFIG_PATH"
14 " to specify additional search paths if needed)."
17 add_library(LibtorrentRasterbar::torrent-rasterbar ALIAS PkgConfig::LIBTORRENT_RASTERBAR)
18 # force a fake package to show up in the feature summary
19 set_property(GLOBAL APPEND PROPERTY
21 "LibtorrentRasterbar via pkg-config (required version >= ${requiredLibtorrentVersion})"
23 set_package_properties("LibtorrentRasterbar via pkg-config (required version >= ${requiredLibtorrentVersion})"
28 set_package_properties(LibtorrentRasterbar PROPERTIES TYPE REQUIRED)
31 find_package(LibtorrentRasterbar ${requiredLibtorrentVersion} REQUIRED COMPONENTS torrent-rasterbar)
33 # force variable type so that it always shows up in ccmake/cmake-gui frontends
34 set_property(CACHE LibtorrentRasterbar_DIR PROPERTY TYPE PATH)
35 find_package(Boost ${requiredBoostVersion} REQUIRED)
36 find_package(OpenSSL ${requiredOpenSSLVersion} REQUIRED)
37 find_package(ZLIB ${requiredZlibVersion} REQUIRED)
38 find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS Core Network Xml LinguistTools)
40 find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS DBus)
41 set_package_properties(Qt5DBus PROPERTIES
42 DESCRIPTION "Qt5 module for inter-process communication over the D-Bus protocol"
43 PURPOSE "Required by the DBUS feature"
47 # automatically call Qt moc, rcc and uic as needed for all targets by default
48 set(CMAKE_AUTORCC_OPTIONS --compress 9 --threshold 5)
53 # create interface-only target libraries with common compile options/definitions to link to
54 include(MacroQbtCommonConfig)
57 # include directories - ideally, would be done per target instead of global directory scope
58 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
60 add_subdirectory(base)
63 find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS Widgets Svg)
64 if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
65 find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS MacExtras)
66 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
67 find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS WinExtras)
73 add_subdirectory(webui)