diff options
author | wm4 <wm4@nowhere> | 2015-05-02 18:47:57 +0200 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-05-07 10:45:33 +0900 |
commit | 26e779c9aa74b84e50d4ca2ea14adf4bc1d961ac (patch) | |
tree | 6f288a39aa5a38e1144c5e16cbe2b5337882bb6c /wscript_build.py | |
parent | fe19db9cc08b96c813987e937bdc6f19a6d629f9 (diff) | |
download | mpv-26e779c9aa74b84e50d4ca2ea14adf4bc1d961ac.tar.bz2 mpv-26e779c9aa74b84e50d4ca2ea14adf4bc1d961ac.tar.xz |
build: move main-fn files to osdep
And split the Cocoa and Unix cases. Simplify the Cocoa case slightly by
calling mpv_main directly, instead of passing a function pointer. Also
add a comment explaining why Cocoa needs a special case at all.
(cherry picked from commit 1e7831070f6ae1af0a1a29b0d680ef2907bf8cf6)
Diffstat (limited to 'wscript_build.py')
-rw-r--r-- | wscript_build.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/wscript_build.py b/wscript_build.py index 89ec67c471..93642c4693 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -71,9 +71,12 @@ def build(ctx): source = "demux/ebml.c", target = "ebml_defs.c") - main_fn_c = { - 'win32': 'player/main-fn-win.c', - }.get(ctx.env.DEST_OS, "player/main-fn-unix.c") + if ctx.env.DEST_OS == 'win32': + main_fn_c = 'osdep/main-fn-win.c' + elif ctx.dependency_satisfied('cocoa'): + main_fn_c = 'osdep/main-fn-cocoa.c' + else: + main_fn_c = 'osdep/main-fn-unix.c' getch2_c = { 'win32': 'osdep/terminal-win.c', |