Merge pull request #12718 from glassez/improve-cmake

Improve CMake project
This commit is contained in:
Vladimir Golovnev 2020-05-02 08:54:25 +03:00 committed by GitHub
commit 4e7ff88cf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 491 additions and 570 deletions

View file

@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
message(AUTHOR_WARNING "If the build fails, please try the autotools/qmake method.")
if(POLICY CMP0074)
if (POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
@ -50,9 +50,9 @@ set(requiredQtVersion 5.9.0)
set(requiredOpensslVersion 1.0)
set(requiredLibtorrentVersion 1.1.10)
if(WIN32)
if (WIN32)
include(winconf)
endif(WIN32)
endif()
# we need options here, at the top level, because they are used not only in "src" subdir, but in the "dist" dir too
@ -62,6 +62,8 @@ optional_compile_definitions(COUNTRIES_RESOLUTION FEATURE DESCRIPTION "Enable re
DEFAULT ON DISABLED DISABLE_COUNTRIES_RESOLUTION)
optional_compile_definitions(STACKTRACE FEATURE DESCRIPTION "Enable stacktraces"
DEFAULT ON ENABLED STACKTRACE)
optional_compile_definitions(GUI FEATURE DESCRIPTION "Build GUI application"
DEFAULT ON DISABLED DISABLE_GUI)
optional_compile_definitions(WEBUI FEATURE DESCRIPTION "Enables built-in HTTP server for headless use"
DEFAULT ON DISABLED DISABLE_WEBUI)