mirror of https://github.com/mpv-player/mpv
build: fix dependency check on macOS
235eb60
added a needed linking flag, but too soon. this lead to some of
the configure checks to fail. add the flag in our build phase.
Fixes #5528
This commit is contained in:
parent
31ee350cce
commit
a17456608c
|
@ -100,15 +100,7 @@ def check_cocoa(ctx, dependency_identifier):
|
||||||
includes = ctx.srcnode.abspath(),
|
includes = ctx.srcnode.abspath(),
|
||||||
linkflags = '-fobjc-arc')
|
linkflags = '-fobjc-arc')
|
||||||
|
|
||||||
res = fn(ctx, dependency_identifier)
|
return fn(ctx, dependency_identifier)
|
||||||
# on macOS we explicitly need to set the SDK path, otherwise it can lead to
|
|
||||||
# linking warnings or errors
|
|
||||||
if res:
|
|
||||||
ctx.env.append_value('LINKFLAGS', [
|
|
||||||
'-isysroot', ctx.env.MACOS_SDK
|
|
||||||
])
|
|
||||||
|
|
||||||
return res
|
|
||||||
|
|
||||||
def check_openal(ctx, dependency_identifier):
|
def check_openal(ctx, dependency_identifier):
|
||||||
checks = [
|
checks = [
|
||||||
|
|
|
@ -152,6 +152,13 @@ def build(ctx):
|
||||||
bridge, header, tgt, src)
|
bridge, header, tgt, src)
|
||||||
return task.exec_command(cmd)
|
return task.exec_command(cmd)
|
||||||
|
|
||||||
|
if ctx.dependency_satisfied('cocoa') and ctx.env.MACOS_SDK:
|
||||||
|
# on macOS we explicitly need to set the SDK path, otherwise it can lead to
|
||||||
|
# linking warnings or errors
|
||||||
|
ctx.env.append_value('LINKFLAGS', [
|
||||||
|
'-isysroot', ctx.env.MACOS_SDK
|
||||||
|
])
|
||||||
|
|
||||||
if ctx.dependency_satisfied('macos-cocoa-cb'):
|
if ctx.dependency_satisfied('macos-cocoa-cb'):
|
||||||
swift_source = [
|
swift_source = [
|
||||||
( "video/out/cocoa_cb_common.swift" ),
|
( "video/out/cocoa_cb_common.swift" ),
|
||||||
|
|
Loading…
Reference in New Issue