Sync translations from Transifex and run lupdate
[qBittorrent.git] / CMakeLists.txt
blobcd17921f232b8f16d240a81dc79ed4a0661e6594
1 cmake_minimum_required(VERSION 3.16 FATAL_ERROR) # Policies <= CMP0097 default to NEW
3 list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
5 project(qBittorrent
6     VERSION 4.4.0.0
7     DESCRIPTION "The qBittorrent BitTorrent client"
8     HOMEPAGE_URL "https://www.qbittorrent.org/"
9     LANGUAGES CXX
12 # use CONFIG mode first in find_package
13 set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
14 # version requirements
15 set(requiredBoostVersion 1.40)
16 set(requiredQtVersion 5.9.0)
17 set(requiredOpenSSLVersion 1.0)
18 set(requiredLibtorrentVersion 1.2.0)
19 set(requiredZlibVersion 1.2.5.2)
21 # features (some are platform-specific)
22 include(FeatureSummary)
23 include(FeatureOptionsSetup)
24 feature_option(STACKTRACE "Enable stacktraces" ON)
25 feature_option(GUI "Build GUI application" ON)
26 feature_option(WEBUI "Enables built-in HTTP server for headless use" ON)
27 feature_option(VERBOSE_CONFIGURE "Show information about PACKAGES_FOUND and PACKAGES_NOT_FOUND in the configure output (only useful for debugging the CMake build scripts)" OFF)
28 if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
29     feature_option_dependent(DBUS
30         "Enables support for notifications and power-management features on Linux via D-Bus"
31         ON "GUI" OFF
32     )
33     feature_option_dependent(SYSTEMD
34         "Install systemd service file to a directory manually overridable with Systemd_SERVICES_INSTALL_DIR"
35         OFF "NOT GUI" OFF
36     )
37 elseif (MSVC)
38     feature_option(MSVC_RUNTIME_DYNAMIC "Use MSVC dynamic runtime library (-MD) instead of static (-MT)" ON)
39 endif()
41 set(QBT_VER_STATUS "alpha1" CACHE STRING "Project status version. Should be empty for release builds.")
43 include(GNUInstallDirs)
44 add_subdirectory(src)
45 add_subdirectory(dist)
47 if (VERBOSE_CONFIGURE)
48     feature_summary(WHAT ALL)
49 else()
50     feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES)
51 endif()