termux-packages/packages/swift/swift-corelibs-foundation-S...

20 lines
905 B
Diff
Raw Normal View History

2021-07-04 19:15:47 +02:00
diff --git a/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt b/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt
index 016bf294..cd534f16 100644
--- a/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt
+++ b/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt
@@ -166,7 +166,14 @@ if(CMAKE_SYSTEM_NAME STREQUAL Windows)
2021-07-04 19:15:47 +02:00
target_link_options(Foundation PRIVATE
$<TARGET_OBJECTS:CoreFoundationResources>)
elseif(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
+ if(NOT BUILD_SHARED_LIBS)
+ target_compile_options(Foundation PRIVATE "SHELL:-disallow-use-new-driver")
+ endif()
target_link_options(Foundation PRIVATE "SHELL:-no-toolchain-stdlib-rpath")
+ if(${CMAKE_SYSTEM_NAME} STREQUAL Android)
+ target_link_libraries(Foundation PRIVATE android-spawn)
+ target_link_directories(Foundation PUBLIC ${CMAKE_FIND_ROOT_PATH}/usr/lib)
+ endif()
endif()