mirror of
https://github.com/mpv-player/mpv
synced 2025-03-19 09:57:34 +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
|
||||
ctx.load("syms")
|
||||
|
||||
additonal_objects = ""
|
||||
if ctx.dependency_satisfied('swift'):
|
||||
additonal_objects = "osdep/macOS_swift.o"
|
||||
|
||||
if ctx.dependency_satisfied('cplayer'):
|
||||
ctx(
|
||||
target = "mpv",
|
||||
source = main_fn_c,
|
||||
use = ctx.dependencies_use() + ['objects'],
|
||||
add_object = "osdep/macOS_swift.o",
|
||||
add_object = additonal_objects,
|
||||
includes = _all_includes(ctx),
|
||||
features = "c cprogram" + (" syms" if syms else ""),
|
||||
export_symbols_def = "libmpv/mpv.def", # for syms=True
|
||||
@ -642,7 +646,7 @@ def build(ctx):
|
||||
"target": "mpv",
|
||||
"source": ctx.filtered_sources(sources),
|
||||
"use": ctx.dependencies_use(),
|
||||
"add_object": "osdep/macOS_swift.o",
|
||||
"add_object": additonal_objects,
|
||||
"includes": [ctx.bldnode.abspath(), ctx.srcnode.abspath()] + \
|
||||
ctx.dependencies_includes(),
|
||||
"features": features,
|
||||
|
Loading…
Reference in New Issue
Block a user