build: allow to disable building the cplayer

This commit is contained in:
Stefano Pigozzi 2014-08-04 10:54:22 +02:00
parent 212374149f
commit 2e241c0a47
2 changed files with 16 additions and 10 deletions

View File

@ -728,6 +728,10 @@ scripting_features = [
standalone_features = [
{
'name': '--cplayer',
'desc': 'mpv CLI player',
'func': check_true
}, {
'name': 'win32-executable',
'desc': 'w32 executable',
'deps_any': [ 'os-win32', 'os-cygwin'],

View File

@ -434,16 +434,18 @@ def build(ctx):
install_name = '/mpv.app/Contents/Resources/' + res_basename
ctx.install_as(ctx.env.BINDIR + install_name, resource)
ctx(
target = "mpv",
source = ctx.filtered_sources(sources) + ["player/main_fn.c"],
use = ctx.dependencies_use(),
includes = [ctx.bldnode.abspath(), ctx.srcnode.abspath()] + \
ctx.dependencies_includes(),
features = "c cprogram",
install_path = ctx.env.BINDIR,
**cprog_kwargs
)
if ctx.dependency_satisfied('cplayer'):
ctx(
target = "mpv",
source = ctx.filtered_sources(sources) + ["player/main_fn.c"],
use = ctx.dependencies_use(),
includes = [ctx.bldnode.abspath(), ctx.srcnode.abspath()] + \
ctx.dependencies_includes(),
features = "c cprogram",
install_path = ctx.env.BINDIR,
**cprog_kwargs
)
build_shared = ctx.dependency_satisfied('libmpv-shared')
build_static = ctx.dependency_satisfied('libmpv-static')