mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 10:28:32 +00:00
build: conditionally compile utils.mm using generator expression (#7704)
This commit is contained in:
@@ -14,6 +14,11 @@ add_compile_options(
|
||||
|
||||
add_library(${TR_NAME} STATIC)
|
||||
|
||||
set(IS_APPLE_CLANG FALSE)
|
||||
if(APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(IS_APPLE_CLANG TRUE)
|
||||
endif()
|
||||
|
||||
target_sources(${TR_NAME}
|
||||
PRIVATE
|
||||
announce-list.cc
|
||||
@@ -156,7 +161,7 @@ target_sources(${TR_NAME}
|
||||
utils-ev.h
|
||||
utils.cc
|
||||
utils.h
|
||||
utils.mm
|
||||
$<$<BOOL:${IS_APPLE_CLANG}>:utils.mm>
|
||||
variant-benc.cc
|
||||
variant-json.cc
|
||||
variant.cc
|
||||
@@ -201,8 +206,6 @@ tr_allow_compile_if(
|
||||
watchdir-inotify.cc
|
||||
[=[[WITH_KQUEUE]]=]
|
||||
watchdir-kqueue.cc
|
||||
[=[[APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang"]]=]
|
||||
utils.mm
|
||||
[=[[WIN32]]=]
|
||||
file-win32.cc
|
||||
subprocess-win32.cc
|
||||
|
||||
Reference in New Issue
Block a user