mirror of
https://github.com/transmission/transmission.git
synced 2026-02-15 07:26:49 +00:00
build: wrap fmt::fmt-header-only with transmission::fmt-header-only (#8370)
This commit is contained in:
@@ -623,6 +623,17 @@ tr_add_external_auto_library(FMT fmt
|
||||
CMAKE_ARGS
|
||||
-DFMT_INSTALL=OFF
|
||||
-DFMT_SYSTEM_HEADERS=ON)
|
||||
if(NOT TARGET transmission::fmt-header-only)
|
||||
add_library(transmission::fmt-header-only INTERFACE IMPORTED)
|
||||
target_link_libraries(transmission::fmt-header-only
|
||||
INTERFACE
|
||||
fmt::fmt-header-only)
|
||||
target_compile_definitions(transmission::fmt-header-only
|
||||
INTERFACE
|
||||
FMT_USE_EXCEPTIONS=0 # {fmt} >= 11.2.0
|
||||
FMT_EXCEPTIONS=0 # {fmt} < 11.2.0
|
||||
)
|
||||
endif()
|
||||
|
||||
tr_add_external_auto_library(SIGSLOT PalSigslot
|
||||
SUBPROJECT
|
||||
|
||||
@@ -7,7 +7,7 @@ target_sources(${TR_NAME}-cli
|
||||
target_link_libraries(${TR_NAME}-cli
|
||||
PRIVATE
|
||||
${TR_NAME}
|
||||
fmt::fmt-header-only)
|
||||
transmission::fmt-header-only)
|
||||
|
||||
tr_win32_app_info(${TR_NAME}-cli
|
||||
"Transmission Utility ('cli', obsolete)"
|
||||
|
||||
@@ -34,7 +34,7 @@ target_link_libraries(${TR_NAME}-daemon
|
||||
PRIVATE
|
||||
${TR_NAME}
|
||||
libevent::core
|
||||
fmt::fmt-header-only
|
||||
transmission::fmt-header-only
|
||||
$<$<BOOL:${WITH_SYSTEMD}>:${SYSTEMD_LIBRARIES}>)
|
||||
|
||||
tr_win32_app_info(${TR_NAME}-daemon
|
||||
|
||||
@@ -200,7 +200,7 @@ target_link_libraries(${TR_NAME}-gtk
|
||||
${TR_NAME}-app
|
||||
${TR_NAME}
|
||||
transmission::gtk_impl
|
||||
fmt::fmt-header-only
|
||||
transmission::fmt-header-only
|
||||
$<$<BOOL:${WITH_APPINDICATOR}>:${APPINDICATOR_LIBRARIES}>)
|
||||
|
||||
if(MSVC)
|
||||
|
||||
@@ -22,4 +22,4 @@ target_include_directories(${LIBNAME}
|
||||
|
||||
target_link_libraries(${LIBNAME}
|
||||
PUBLIC
|
||||
fmt::fmt-header-only)
|
||||
transmission::fmt-header-only)
|
||||
|
||||
@@ -223,8 +223,6 @@ target_compile_definitions(${TR_NAME}
|
||||
$<$<BOOL:${USE_SYSTEM_B64}>:USE_SYSTEM_B64>
|
||||
$<$<BOOL:${HAVE_SO_REUSEPORT}>:HAVE_SO_REUSEPORT=1>
|
||||
PUBLIC
|
||||
FMT_USE_EXCEPTIONS=0 # {fmt} >= 11.2.0
|
||||
FMT_EXCEPTIONS=0 # {fmt} < 11.2.0
|
||||
$<$<STREQUAL:${CRYPTO_PKG},ccrypto>:WITH_CCRYPTO>
|
||||
$<$<STREQUAL:${CRYPTO_PKG},mbedtls>:WITH_MBEDTLS>
|
||||
$<$<STREQUAL:${CRYPTO_PKG},openssl>:WITH_OPENSSL>
|
||||
@@ -284,7 +282,7 @@ target_link_libraries(${TR_NAME}
|
||||
$<$<BOOL:${HAVE_LIBATOMIC}>:atomic>
|
||||
PUBLIC
|
||||
transmission::crypto_impl
|
||||
fmt::fmt-header-only
|
||||
transmission::fmt-header-only
|
||||
Pal::Sigslot
|
||||
transmission::small
|
||||
libevent::core
|
||||
|
||||
@@ -408,7 +408,7 @@ find_library(SPARKLE_FRAMEWORK Sparkle
|
||||
target_link_libraries(${TR_NAME}-mac
|
||||
PRIVATE
|
||||
${TR_NAME}
|
||||
fmt::fmt-header-only
|
||||
transmission::fmt-header-only
|
||||
vdkqueue
|
||||
${SPARKLE_FRAMEWORK}
|
||||
"-framework AppKit"
|
||||
|
||||
@@ -83,7 +83,7 @@ target_link_libraries(libtransmission-test
|
||||
${TR_NAME}
|
||||
GTest::gtest_main
|
||||
dht::dht
|
||||
fmt::fmt-header-only
|
||||
transmission::fmt-header-only
|
||||
libevent::core
|
||||
WideInteger::WideInteger)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ foreach(P create edit remote show)
|
||||
PRIVATE
|
||||
${TR_NAME}
|
||||
CURL::libcurl
|
||||
fmt::fmt-header-only
|
||||
transmission::fmt-header-only
|
||||
libevent::core)
|
||||
|
||||
tr_win32_app_info(${TR_NAME}-${P}
|
||||
|
||||
Reference in New Issue
Block a user