Skip to content

Commit e074bee

Browse files
committed
Build: Correct BlocksRuntime dependency for Darwin
1 parent 04daebe commit e074bee

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

src/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@ if(LibRT_FOUND)
137137
endif()
138138
target_link_libraries(dispatch PRIVATE
139139
Threads::Threads)
140-
target_link_libraries(dispatch PUBLIC
141-
BlocksRuntime::BlocksRuntime)
140+
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
141+
target_link_libraries(dispatch PUBLIC
142+
BlocksRuntime::BlocksRuntime)
143+
endif()
142144
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
143145
target_link_libraries(dispatch PRIVATE
144146
ShLwApi

src/swift/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ set_target_properties(swiftDispatch PROPERTIES
3737
Swift_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/swift
3838
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/swift)
3939
target_link_libraries(swiftDispatch PRIVATE
40-
DispatchStubs
41-
BlocksRuntime::BlocksRuntime)
40+
DispatchStubs)
41+
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
42+
target_link_libraries(swiftDispatch PRIVATE
43+
BlocksRuntime::BlocksRuntime)
44+
endif()
4245
target_link_libraries(swiftDispatch PUBLIC
4346
dispatch)
4447
add_dependencies(swiftDispatch module-maps)

tests/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,11 @@ function(add_unit_test name)
9999
target_link_libraries(${name}
100100
PRIVATE
101101
dispatch
102-
Threads::Threads
103-
BlocksRuntime::BlocksRuntime)
102+
Threads::Threads)
103+
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
104+
target_link_libraries(${name} PRIVATE
105+
BlocksRuntime::BlocksRuntime)
106+
endif()
104107
target_link_libraries(${name} PRIVATE bsdtests)
105108
add_test(NAME ${name}
106109
COMMAND bsdtestharness $<TARGET_FILE:${name}>)

0 commit comments

Comments
 (0)