Skip to content

Commit 8236080

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-next
2 parents f22391d + 0ddd668 commit 8236080

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

cmake/modules/SwiftConfigureSDK.cmake

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function(_report_sdk prefix)
2828
message(STATUS " ${arch} LIB: ${${arch}_LIB}")
2929
endforeach()
3030
elseif("${prefix}" STREQUAL "ANDROID")
31-
message(STATUS " NDK Dir: $ENV{SWIFT_ANDROID_NDK_PATH}")
31+
message(STATUS " NDK: $ENV{SWIFT_ANDROID_NDK_PATH}")
3232
foreach(arch ${SWIFT_SDK_${prefix}_ARCHITECTURES})
3333
swift_android_include_for_arch(${arch} ${arch}_INCLUDE)
3434
swift_android_lib_for_arch(${arch} ${arch}_LIB)
@@ -225,10 +225,14 @@ macro(configure_sdk_unix name architectures)
225225
endif()
226226

227227
# Get the prebuilt suffix to create the correct toolchain path when using the NDK
228-
if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Darwin")
229-
set(_swift_android_prebuilt_build "darwin-x86_64")
230-
elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux")
231-
set(_swift_android_prebuilt_build "linux-x86_64")
228+
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin)
229+
set(_swift_android_prebuilt_build darwin-x86_64)
230+
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL Linux)
231+
set(_swift_android_prebuilt_build linux-x86_64)
232+
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
233+
set(_swift_android_prebuilt_build Windows-x86_64)
234+
else()
235+
message(SEND_ERROR "cannot cross-compile to android from ${CMAKE_HOST_SYSTEM_NAME}")
232236
endif()
233237
if("${arch}" STREQUAL "i686")
234238
set(SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_PREBUILT_PATH

0 commit comments

Comments
 (0)