summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2018-02-12 15:09:13 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-02-12 08:29:22 -0800
commit3f735208979949dd2738680ac31ee4040d390855 (patch)
tree643c58ef00efcbbe6bc04f72f05153525f5b1e43
parentc5e4538bc4b63f02bf89f62aa25a37b9eb0c0316 (diff)
downloadmpv-3f735208979949dd2738680ac31ee4040d390855.tar.bz2
mpv-3f735208979949dd2738680ac31ee4040d390855.tar.xz
build: fix configure on windows
configure failed because of a wrong check. fix the check and also only check for swift on macOS.
-rw-r--r--waftools/detections/compiler_swift.py15
1 files 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)