From 3f735208979949dd2738680ac31ee4040d390855 Mon Sep 17 00:00:00 2001 From: Akemi Date: Mon, 12 Feb 2018 15:09:13 +0100 Subject: build: fix configure on windows configure failed because of a wrong check. fix the check and also only check for swift on macOS. --- waftools/detections/compiler_swift.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/waftools/detections/compiler_swift.py b/waftools/detections/compiler_swift.py index 36f4f0b432..fba5964e8a 100644 --- a/waftools/detections/compiler_swift.py +++ b/waftools/detections/compiler_swift.py @@ -44,28 +44,29 @@ def __find_swift_library(ctx): ctx.end_msg(swift_library) __add_swift_library_linking_flags(ctx, swift_library) return - ctx.end_msg(None, "RED") + ctx.end_msg(False) def __find_macos_sdk(ctx): ctx.start_msg('Checking for macOS SDK') sdk = __run('xcrun --sdk macosx --show-sdk-path') - if sdk != "": + if sdk: ctx.end_msg(sdk) ctx.env.MACOS_SDK = sdk else: - ctx.end_msg(None, "RED") + ctx.end_msg(False) def __find_swift_compiler(ctx): ctx.start_msg('Checking for swift (Swift compiler)') swift = __run('xcrun -find swift') - if swift != "": + if swift: ctx.end_msg(swift) ctx.env.SWIFT = swift __add_swift_flags(ctx) __find_swift_library(ctx) else: - ctx.end_msg(None, "RED") + ctx.end_msg(False) def configure(ctx): - __find_macos_sdk(ctx) - __find_swift_compiler(ctx) + if ctx.env.DEST_OS == "darwin": + __find_macos_sdk(ctx) + __find_swift_compiler(ctx) -- cgit v1.2.3