mirror of https://github.com/mpv-player/mpv
add swift as main dependency so all dependencies can be disabled easily
(cherry picked from commit 5c2056ad0a
)
This commit is contained in:
parent
89e52a228c
commit
5a9add1fb3
|
@ -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
|
||||
|
|
9
wscript
9
wscript
|
@ -168,6 +168,11 @@ main_dependencies = [
|
|||
'req': True,
|
||||
'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',
|
||||
|
@ -912,8 +917,8 @@ standalone_features = [
|
|||
}, {
|
||||
'name': '--macos-cocoa-cb',
|
||||
'desc': 'macOS opengl-cb backend',
|
||||
'deps': 'cocoa',
|
||||
'func': check_swift
|
||||
'deps': 'cocoa && swift',
|
||||
'func': check_true
|
||||
}
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in New Issue