cmake_minimum_required ( VERSION 3.16 FATAL_ERROR ) # Policies <= CMP0097 default to NEW
list ( APPEND CMAKE_MODULE_PATH ${ CMAKE_CURRENT_SOURCE_DIR } /cmake/Modules )
project ( qBittorrent
V E R S I O N 4 . 3 . 0 . 0
D E S C R I P T I O N " T h e q B i t t o r r e n t B i t T o r r e n t c l i e n t "
H O M E P A G E _ U R L " h t t p s : / / w w w . q b i t t o r r e n t . o r g / "
L A N G U A G E S C X X
)
# use CONFIG mode first in find_package
set ( CMAKE_FIND_PACKAGE_PREFER_CONFIG ON )
# version requirements
set ( requiredBoostVersion 1.40 )
set ( requiredQtVersion 5.9.0 )
set ( requiredOpenSSLVersion 1.0 )
set ( requiredLibtorrentVersion 1.2.0 )
set ( requiredZlibVersion 1.2.5.2 )
# features (some are platform-specific)
include ( FeatureSummary )
include ( FeatureOptionsSetup )
feature_option ( STACKTRACE "Enable stacktraces" ON )
feature_option ( GUI "Build GUI application" ON )
feature_option ( WEBUI "Enables built-in HTTP server for headless use" ON )
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 )
if ( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
feature_option_dependent ( DBUS
" E n a b l e s s u p p o r t f o r n o t i f i c a t i o n s a n d p o w e r - m a n a g e m e n t f e a t u r e s o n L i n u x v i a D - B u s "
O N " G U I " O F F
)
feature_option_dependent ( SYSTEMD
" I n s t a l l s y s t e m d s e r v i c e f i l e t o a d i r e c t o r y m a n u a l l y o v e r r i d a b l e w i t h S y s t e m d _ S E R V I C E S _ I N S T A L L _ D I R "
O F F " N O T G U I " O F F
)
elseif ( MSVC )
feature_option ( MSVC_RUNTIME_DYNAMIC "Use MSVC dynamic runtime library (-MD) instead of static (-MT)" ON )
endif ( )
set ( QBT_VER_STATUS "alpha1" CACHE STRING "Project status version. Should be empty for release builds." )
include ( GNUInstallDirs )
add_subdirectory ( src )
add_subdirectory ( dist )
if ( VERBOSE_CONFIGURE )
feature_summary ( WHAT ALL )
else ( )
feature_summary ( WHAT ENABLED_FEATURES DISABLED_FEATURES )
endif ( )