mirror of
https://github.com/mpv-player/mpv
synced 2025-03-19 18:05:21 +00:00
build: don't add swift object when swift disabled
This commit is contained in:
parent
600824494d
commit
511a73c5ce
@ -580,12 +580,16 @@ def build(ctx):
|
|||||||
syms = True
|
syms = True
|
||||||
ctx.load("syms")
|
ctx.load("syms")
|
||||||
|
|
||||||
|
additonal_objects = ""
|
||||||
|
if ctx.dependency_satisfied('swift'):
|
||||||
|
additonal_objects = "osdep/macOS_swift.o"
|
||||||
|
|
||||||
if ctx.dependency_satisfied('cplayer'):
|
if ctx.dependency_satisfied('cplayer'):
|
||||||
ctx(
|
ctx(
|
||||||
target = "mpv",
|
target = "mpv",
|
||||||
source = main_fn_c,
|
source = main_fn_c,
|
||||||
use = ctx.dependencies_use() + ['objects'],
|
use = ctx.dependencies_use() + ['objects'],
|
||||||
add_object = "osdep/macOS_swift.o",
|
add_object = additonal_objects,
|
||||||
includes = _all_includes(ctx),
|
includes = _all_includes(ctx),
|
||||||
features = "c cprogram" + (" syms" if syms else ""),
|
features = "c cprogram" + (" syms" if syms else ""),
|
||||||
export_symbols_def = "libmpv/mpv.def", # for syms=True
|
export_symbols_def = "libmpv/mpv.def", # for syms=True
|
||||||
@ -642,7 +646,7 @@ def build(ctx):
|
|||||||
"target": "mpv",
|
"target": "mpv",
|
||||||
"source": ctx.filtered_sources(sources),
|
"source": ctx.filtered_sources(sources),
|
||||||
"use": ctx.dependencies_use(),
|
"use": ctx.dependencies_use(),
|
||||||
"add_object": "osdep/macOS_swift.o",
|
"add_object": additonal_objects,
|
||||||
"includes": [ctx.bldnode.abspath(), ctx.srcnode.abspath()] + \
|
"includes": [ctx.bldnode.abspath(), ctx.srcnode.abspath()] + \
|
||||||
ctx.dependencies_includes(),
|
ctx.dependencies_includes(),
|
||||||
"features": features,
|
"features": features,
|
||||||
|
Loading…
Reference in New Issue
Block a user