mirror of https://github.com/mpv-player/mpv
build: fix swift build with waf 1.8.4
with older waf versions a node doesn't return an absolute path but just a relative one. fix this by explicitly requesting an absolute one. Fixes #5604
This commit is contained in:
parent
047eb1b914
commit
12b90e744d
|
@ -38,8 +38,8 @@ def __find_swift_library(ctx):
|
||||||
for path in swift_library_paths:
|
for path in swift_library_paths:
|
||||||
swift_library = ctx.root.find_dir([dev_path, path])
|
swift_library = ctx.root.find_dir([dev_path, path])
|
||||||
if swift_library is not None:
|
if swift_library is not None:
|
||||||
ctx.end_msg(swift_library)
|
ctx.end_msg(swift_library.abspath())
|
||||||
__add_swift_library_linking_flags(ctx, swift_library)
|
__add_swift_library_linking_flags(ctx, swift_library.abspath())
|
||||||
return
|
return
|
||||||
ctx.end_msg(False)
|
ctx.end_msg(False)
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ def build(ctx):
|
||||||
|
|
||||||
def swift(task):
|
def swift(task):
|
||||||
src = ' '.join([x.abspath() for x in task.inputs])
|
src = ' '.join([x.abspath() for x in task.inputs])
|
||||||
bridge = ctx.path.find_node("osdep/macOS_swift_bridge.h")
|
bridge = ctx.path.find_node("osdep/macOS_swift_bridge.h").abspath()
|
||||||
tgt = task.outputs[0].abspath()
|
tgt = task.outputs[0].abspath()
|
||||||
header = task.outputs[1].abspath()
|
header = task.outputs[1].abspath()
|
||||||
module = task.outputs[2].abspath()
|
module = task.outputs[2].abspath()
|
||||||
|
@ -179,7 +179,7 @@ def build(ctx):
|
||||||
|
|
||||||
ctx.env.append_value('LINKFLAGS', [
|
ctx.env.append_value('LINKFLAGS', [
|
||||||
'-Xlinker', '-add_ast_path',
|
'-Xlinker', '-add_ast_path',
|
||||||
'-Xlinker', '%s' % ctx.path.find_resource("osdep/macOS_swift.swiftmodule")
|
'-Xlinker', '%s' % ctx.path.find_or_declare("osdep/macOS_swift.swiftmodule").abspath()
|
||||||
])
|
])
|
||||||
|
|
||||||
if ctx.dependency_satisfied('cplayer'):
|
if ctx.dependency_satisfied('cplayer'):
|
||||||
|
|
Loading…
Reference in New Issue