diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index adc989d42..2ecd29d73 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -137,8 +137,10 @@ if(LibRT_FOUND) endif() target_link_libraries(dispatch PRIVATE Threads::Threads) -target_link_libraries(dispatch PUBLIC - BlocksRuntime::BlocksRuntime) +if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin) + target_link_libraries(dispatch PUBLIC + BlocksRuntime::BlocksRuntime) +endif() if(CMAKE_SYSTEM_NAME STREQUAL Windows) target_link_libraries(dispatch PRIVATE ShLwApi diff --git a/src/swift/CMakeLists.txt b/src/swift/CMakeLists.txt index f721e82a3..b1cfc42b6 100644 --- a/src/swift/CMakeLists.txt +++ b/src/swift/CMakeLists.txt @@ -38,8 +38,11 @@ set_target_properties(swiftDispatch PROPERTIES Swift_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/swift INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/swift) target_link_libraries(swiftDispatch PRIVATE - DispatchStubs - BlocksRuntime::BlocksRuntime) + DispatchStubs) +if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin) + target_link_libraries(swiftDispatch PRIVATE + BlocksRuntime::BlocksRuntime) +endif() target_link_libraries(swiftDispatch PUBLIC dispatch) add_dependencies(swiftDispatch module-maps) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0176a062b..86a6a75cc 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -99,8 +99,11 @@ function(add_unit_test name) target_link_libraries(${name} PRIVATE dispatch - Threads::Threads - BlocksRuntime::BlocksRuntime) + Threads::Threads) + if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin) + target_link_libraries(${name} PRIVATE + BlocksRuntime::BlocksRuntime) + endif() target_link_libraries(${name} PRIVATE bsdtests) add_test(NAME ${name} COMMAND bsdtestharness $)