diff options
author | owl0w1 <17188713+owl0w1@users.noreply.github.com> | 2024-03-07 20:45:27 +0800 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2024-03-07 14:20:44 +0100 |
commit | 0d33394955cb9d90905e8ade8776a3574d694544 (patch) | |
tree | dfcac3ad28a1d15ecc3fb6f2c92762c370efed81 | |
parent | a13a6743633d9e0eddb2ea7befbef89f1e19788a (diff) | |
download | mpv-0d33394955cb9d90905e8ade8776a3574d694544.tar.bz2 mpv-0d33394955cb9d90905e8ade8776a3574d694544.tar.xz |
meson: remove main function from libmpv build
Only include a main function in cplayer build, not libmpv build. This shaves off 40 bytes from libmpv build.
-rw-r--r-- | meson.build | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/meson.build b/meson.build index dd07caeb1e..608cd10a09 100644 --- a/meson.build +++ b/meson.build @@ -392,11 +392,11 @@ features += {'cocoa': cocoa.found()} if features['cocoa'] dependencies += cocoa sources += files('osdep/language-mac.c', - 'osdep/main-fn-mac.c', 'osdep/path-mac.m', 'osdep/utils-mac.c', 'osdep/mac/application.m', 'osdep/mac/events.m') + main_fn_source = files('osdep/main-fn-mac.c') endif if posix @@ -413,8 +413,8 @@ if posix endif if posix and not features['cocoa'] - sources += files('osdep/main-fn-unix.c', - 'osdep/language-posix.c') + sources += files('osdep/language-posix.c') + main_fn_source = files('osdep/main-fn-unix.c') endif if darwin @@ -502,11 +502,11 @@ if features['win32-desktop'] subprocess_source = files('osdep/subprocess-win.c') sources += files('input/ipc-win.c', 'osdep/language-win.c', - 'osdep/main-fn-win.c', 'osdep/terminal-win.c', 'video/out/w32_common.c', 'video/out/win32/displayconfig.c', 'video/out/win32/droptarget.c') + main_fn_source = files('osdep/main-fn-win.c') endif if not posix and not features['win32-desktop'] @@ -1747,7 +1747,7 @@ if get_option('cplayer') rename: 'mpv.svg') install_data('etc/mpv-symbolic.svg', install_dir: join_paths(hicolor_dir, 'symbolic', 'apps')) - mpv = executable('mpv', objects: libmpv.extract_all_objects(recursive: true), dependencies: dependencies, + mpv = executable('mpv', main_fn_source, objects: libmpv.extract_all_objects(recursive: true), dependencies: dependencies, win_subsystem: 'windows,6.0', install: true) # Older meson versions generate this in the player subdirectory. |