mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 05:08:05 -06:00
Refactor CMake build scripts
1. Use FeatureSummary module to show configuration results. 2. Invert option()/find_package() relationship: instead of calling find_package(... REQUIRED) when option is set, rely on optional find package call and PackageName_FOUND variable. 3. Refactor handling options that result in simple preprocessor defines (actually copy the snippet from libtorrent) so that everything is done in a single function call. 4. Populate target properties in order to get rid of include_directories() calls.
This commit is contained in:
committed by
sledgehammer999
parent
57ec9db532
commit
bb893e70c5
@@ -1,4 +1,4 @@
|
||||
set(QBT_WEBUI_HEADERS
|
||||
add_library(qbt_webui STATIC
|
||||
api/apicontroller.h
|
||||
api/apierror.h
|
||||
api/appcontroller.h
|
||||
@@ -13,9 +13,6 @@ api/serialize/serialize_torrent.h
|
||||
extra_translations.h
|
||||
webapplication.h
|
||||
webui.h
|
||||
)
|
||||
|
||||
set(QBT_WEBUI_SOURCES
|
||||
api/apicontroller.cpp
|
||||
api/apierror.cpp
|
||||
api/appcontroller.cpp
|
||||
@@ -30,8 +27,6 @@ webapplication.cpp
|
||||
webui.cpp
|
||||
)
|
||||
|
||||
qbt_target_sources(webui.qrc)
|
||||
|
||||
add_library(qbt_webui STATIC ${QBT_WEBUI_HEADERS} ${QBT_WEBUI_SOURCES})
|
||||
target_link_libraries(qbt_webui qbt_base)
|
||||
qbt_target_sources(qBittorrent PRIVATE webui.qrc)
|
||||
|
||||
target_link_libraries(qbt_webui PUBLIC qbt_base)
|
||||
|
||||
Reference in New Issue
Block a user