From 2e241c0a47f3c9629c6f751ed9ca309d4c8e3a57 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 4 Aug 2014 10:54:22 +0200 Subject: build: allow to disable building the cplayer --- wscript | 4 ++++ wscript_build.py | 22 ++++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/wscript b/wscript index e0d71235e5..7786ebf7d2 100644 --- a/wscript +++ b/wscript @@ -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'], diff --git a/wscript_build.py b/wscript_build.py index bfb847a319..8825f15b6f 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -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') -- cgit v1.2.3