summaryrefslogtreecommitdiffstats
path: root/wscript_build.py
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-22 11:40:39 +0200
committerwm4 <wm4@nowhere>2017-08-22 11:40:39 +0200
commit5361c0b5d897ec7c969d2a75bb2dde345d62a59c (patch)
tree6841fd38d47d79461352df0cdb29a08cfd430815 /wscript_build.py
parent09c501a40eed7cb05c73fc30ea814d1d256ac0eb (diff)
downloadmpv-5361c0b5d897ec7c969d2a75bb2dde345d62a59c.tar.bz2
mpv-5361c0b5d897ec7c969d2a75bb2dde345d62a59c.tar.xz
build: pick a main-fn source file only if cplayer is built
libmpv does not need this.
Diffstat (limited to 'wscript_build.py')
-rw-r--r--wscript_build.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/wscript_build.py b/wscript_build.py
index e0eaec4b66..d96ff40133 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -119,11 +119,12 @@ def build(ctx):
ctx(features = "ebml_header", target = "ebml_types.h")
ctx(features = "ebml_definitions", target = "ebml_defs.c")
- main_fn_c = ctx.pick_first_matching_dep([
- ( "osdep/main-fn-cocoa.c", "cocoa" ),
- ( "osdep/main-fn-unix.c", "posix" ),
- ( "osdep/main-fn-win.c", "win32-desktop" ),
- ])
+ if ctx.dependency_satisfied('cplayer'):
+ main_fn_c = ctx.pick_first_matching_dep([
+ ( "osdep/main-fn-cocoa.c", "cocoa" ),
+ ( "osdep/main-fn-unix.c", "posix" ),
+ ( "osdep/main-fn-win.c", "win32-desktop" ),
+ ])
getch2_c = ctx.pick_first_matching_dep([
( "osdep/terminal-unix.c", "posix" ),