summaryrefslogtreecommitdiffstats
path: root/wscript_build.py
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2020-06-27 11:12:46 +0200
committerder richter <der.richter@gmx.de>2020-08-22 14:22:49 +0200
commitf79a591ae471c4da6fbb40c1da4bc4220f90aba4 (patch)
treedd1825ff6fe72a3fa33d335eff047f5de7f4f683 /wscript_build.py
parentb16a6cb6c62657d3efbe69bd854287da149b59a1 (diff)
downloadmpv-f79a591ae471c4da6fbb40c1da4bc4220f90aba4.tar.bz2
mpv-f79a591ae471c4da6fbb40c1da4bc4220f90aba4.tar.xz
cocoa-cb: generalisation of backend independent parts
move all backend independent code parts in their own folder and files, to simplify adding new backends. the goal is to only extend one class and add the backend dependent parts there. usually only the (un)init, config and related parts need to be implemented per backend. furthermore all needed windowing and related events are propagated and can be overwritten. the other backend dependent part is usually the surface for rendering, for example the opengl oder metal layer. in the best case a new backend can be added with only a few hundred lines.
Diffstat (limited to 'wscript_build.py')
-rw-r--r--wscript_build.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/wscript_build.py b/wscript_build.py
index 41c8e60f27..63eb29a8f6 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -153,7 +153,7 @@ def build(ctx):
return task.exec_command(cmd)
- if ctx.dependency_satisfied('macos-cocoa-cb'):
+ if ctx.dependency_satisfied('cocoa') and ctx.dependency_satisfied('swift'):
swift_source = [
( "osdep/macos/log_helper.swift" ),
( "osdep/macos/libmpv_helper.swift" ),
@@ -161,11 +161,12 @@ def build(ctx):
( "osdep/macos/swift_extensions.swift" ),
( "osdep/macos/swift_compat.swift" ),
( "osdep/macos/remote_command_center.swift", "macos-media-player" ),
- ( "video/out/cocoa-cb/events_view.swift" ),
- ( "video/out/cocoa-cb/video_layer.swift" ),
- ( "video/out/cocoa-cb/window.swift" ),
- ( "video/out/cocoa-cb/title_bar.swift" ),
- ( "video/out/cocoa_cb_common.swift" ),
+ ( "video/out/mac/common.swift" ),
+ ( "video/out/mac/view.swift" ),
+ ( "video/out/mac/window.swift" ),
+ ( "video/out/mac/title_bar.swift" ),
+ ( "video/out/cocoa_cb_common.swift", "macos-cocoa-cb" ),
+ ( "video/out/mac/gl_layer.swift", "macos-cocoa-cb" ),
]
ctx(