1
mirror of https://github.com/qbittorrent/qBittorrent synced 2024-10-19 21:36:47 +02:00

Merge pull request #13399 from Chocobo1/cmake

Improvements to cmake build system
This commit is contained in:
Mike Tzou 2020-09-19 22:12:42 +08:00 committed by GitHub
commit 63ff5e348c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -95,8 +95,4 @@ macro(qbt_common_config)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif() endif()
if (CMAKE_GENERATOR MATCHES "Visual Studio")
target_compile_options(qbt_common_cfg INTERFACE /MP)
endif()
endmacro(qbt_common_config) endmacro(qbt_common_config)

View File

@ -32,7 +32,7 @@ else()
endif() endif()
# force variable type so that it always shows up in ccmake/cmake-gui frontends # force variable type so that it always shows up in ccmake/cmake-gui frontends
set_property(CACHE LibtorrentRasterbar_DIR PROPERTY TYPE PATH) set_property(CACHE LibtorrentRasterbar_DIR PROPERTY TYPE PATH)
find_package(Boost ${requiredBoostVersion} REQUIRED COMPONENTS system) find_package(Boost ${requiredBoostVersion} REQUIRED)
find_package(OpenSSL ${requiredOpenSSLVersion} REQUIRED) find_package(OpenSSL ${requiredOpenSSLVersion} REQUIRED)
find_package(ZLIB ${requiredZlibVersion} REQUIRED) find_package(ZLIB ${requiredZlibVersion} REQUIRED)
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS Core Network Xml LinguistTools) find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS Core Network Xml LinguistTools)
@ -45,6 +45,7 @@ if (DBUS)
endif() endif()
# automatically call Qt moc, rcc and uic as needed for all targets by default # automatically call Qt moc, rcc and uic as needed for all targets by default
set(CMAKE_AUTORCC_OPTIONS --compress 9 --threshold 5)
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON) set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOUIC ON)