mirror of https://github.com/mpv-player/mpv
build: don't hardcode swift module name
This commit is contained in:
parent
eab30807fe
commit
543a3bc0bd
|
@ -147,11 +147,12 @@ def build(ctx):
|
||||||
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()
|
||||||
|
module_name = os.path.basename(module).rsplit(".", 1)[0]
|
||||||
|
|
||||||
cmd = [ ctx.env.SWIFT ]
|
cmd = [ ctx.env.SWIFT ]
|
||||||
cmd.extend(ctx.env.SWIFT_FLAGS)
|
cmd.extend(ctx.env.SWIFT_FLAGS)
|
||||||
cmd.extend([
|
cmd.extend([
|
||||||
"-module-name", "macOS_swift",
|
"-module-name", module_name,
|
||||||
"-emit-module-path", module,
|
"-emit-module-path", module,
|
||||||
"-import-objc-header", bridge,
|
"-import-objc-header", bridge,
|
||||||
"-emit-objc-header-path", header,
|
"-emit-objc-header-path", header,
|
||||||
|
|
Loading…
Reference in New Issue