build: pick a main-fn source file only if cplayer is built

libmpv does not need this.
This commit is contained in:
wm4 2017-08-22 11:40:39 +02:00
parent 09c501a40e
commit 5361c0b5d8
1 changed files with 6 additions and 5 deletions

View File

@ -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" ),