summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--waftools/checks/custom.py2
-rw-r--r--wscript9
2 files changed, 9 insertions, 2 deletions
diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py
index 1cb133f27c..821bf9c46f 100644
--- a/waftools/checks/custom.py
+++ b/waftools/checks/custom.py
@@ -115,6 +115,8 @@ def check_cocoa(ctx, dependency_identifier):
def check_swift(ctx, dependency_identifier):
if ctx.env.SWIFT_VERSION:
major = int(ctx.env.SWIFT_VERSION.split('.')[0])
+ ctx.add_optional_message(dependency_identifier,
+ 'version found: ' + ctx.env.SWIFT_VERSION)
if major >= 3:
return True
return False
diff --git a/wscript b/wscript
index 1089695ff9..b299a27a1a 100644
--- a/wscript
+++ b/wscript
@@ -171,6 +171,11 @@ main_dependencies = [
'fmsg': 'Unable to find either POSIX or MinGW-w64 environment, ' \
'or compiler does not work.',
}, {
+ 'name': '--swift',
+ 'desc': 'macOS Swift build tools',
+ 'deps': 'os-darwin',
+ 'func': check_swift,
+ }, {
'name': '--uwp',
'desc': 'Universal Windows Platform',
'default': 'disable',
@@ -914,8 +919,8 @@ standalone_features = [
}, {
'name': '--macos-cocoa-cb',
'desc': 'macOS opengl-cb backend',
- 'deps': 'cocoa',
- 'func': check_swift
+ 'deps': 'cocoa && swift',
+ 'func': check_true
}
]