1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-10 08:13:03 +00:00

add swift as main dependency so all dependencies can be disabled easily

This commit is contained in:
Akemi 2018-07-08 17:05:13 +02:00 committed by Jan Ekström
parent 50787acb27
commit 5c2056ad0a
2 changed files with 9 additions and 2 deletions

View File

@ -115,6 +115,8 @@ def check_cocoa(ctx, dependency_identifier):
def check_swift(ctx, dependency_identifier): def check_swift(ctx, dependency_identifier):
if ctx.env.SWIFT_VERSION: if ctx.env.SWIFT_VERSION:
major = int(ctx.env.SWIFT_VERSION.split('.')[0]) major = int(ctx.env.SWIFT_VERSION.split('.')[0])
ctx.add_optional_message(dependency_identifier,
'version found: ' + ctx.env.SWIFT_VERSION)
if major >= 3: if major >= 3:
return True return True
return False return False

View File

@ -170,6 +170,11 @@ main_dependencies = [
'req': True, 'req': True,
'fmsg': 'Unable to find either POSIX or MinGW-w64 environment, ' \ 'fmsg': 'Unable to find either POSIX or MinGW-w64 environment, ' \
'or compiler does not work.', 'or compiler does not work.',
}, {
'name': '--swift',
'desc': 'macOS Swift build tools',
'deps': 'os-darwin',
'func': check_swift,
}, { }, {
'name': '--uwp', 'name': '--uwp',
'desc': 'Universal Windows Platform', 'desc': 'Universal Windows Platform',
@ -914,8 +919,8 @@ standalone_features = [
}, { }, {
'name': '--macos-cocoa-cb', 'name': '--macos-cocoa-cb',
'desc': 'macOS opengl-cb backend', 'desc': 'macOS opengl-cb backend',
'deps': 'cocoa', 'deps': 'cocoa && swift',
'func': check_swift 'func': check_true
} }
] ]