Skip to content

Commit 61a8e72

Browse files
committed
Build: search libraries in Apple SDKs (if needed)
Addresses rdar://problem/56204969
1 parent 511a26b commit 61a8e72

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,6 +1261,10 @@ function(_add_swift_library_single target name)
12611261
"${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/../lib/swift/${SWIFTLIB_SINGLE_SUBDIR}"
12621262
"${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/../lib/swift/${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_LIB_SUBDIR}")
12631263

1264+
if(DEFINED ENV{SDKROOT})
1265+
list(APPEND library_search_directories "$ENV{SDKROOT}/usr/lib/swift")
1266+
endif()
1267+
12641268
# Add variant-specific flags.
12651269
if(SWIFTLIB_SINGLE_TARGET_LIBRARY)
12661270
set(build_type "${SWIFT_STDLIB_BUILD_TYPE}")

0 commit comments

Comments
 (0)