mirror of https://github.com/mpv-player/mpv
build: fix build with disabled swift and Media Player
when swift is disabled some headers are not included. one of them is the options/options.h header that is needed for the vo_sub_opts struct. we include it to fix the build without swift. the second problem is the build time check for the macOS 10.12.2 features or more specific the Media Player support. since it is a swift feature we can not use it when swift is disabled. add a separate Media Player check that also depends on swift and use that new preprocessor variable as a build time check instead. Fixes #7282
This commit is contained in:
parent
9f2fda7d85
commit
e7add205d8
|
@ -24,6 +24,7 @@
|
|||
#include "input/input.h"
|
||||
#include "player/client.h"
|
||||
#include "options/m_config.h"
|
||||
#include "options/options.h"
|
||||
|
||||
#import "osdep/macosx_application_objc.h"
|
||||
#include "osdep/macosx_compat.h"
|
||||
|
@ -299,7 +300,7 @@ static void init_cocoa_application(bool regular)
|
|||
[NSApp setDelegate:NSApp];
|
||||
[NSApp setMenuBar:[[MenuBar alloc] init]];
|
||||
|
||||
#if HAVE_MACOS_10_12_2_FEATURES
|
||||
#if HAVE_MACOS_MEDIA_PLAYER
|
||||
// 10.12.2 runtime availability check
|
||||
if ([NSApp respondsToSelector:@selector(touchBar)]) {
|
||||
[NSApp setRemoteCommandCenter:[[RemoteCommandCenter alloc] initWithApp:NSApp]];
|
||||
|
|
5
wscript
5
wscript
|
@ -928,6 +928,11 @@ standalone_features = [
|
|||
'desc': 'macOS 10.14 SDK Features',
|
||||
'deps': 'cocoa',
|
||||
'func': check_macos_sdk('10.14')
|
||||
},{
|
||||
'name': '--macos-media-player',
|
||||
'desc': 'macOS Media Player support',
|
||||
'deps': 'macos-10-12-2-features && swift',
|
||||
'func': check_true
|
||||
}, {
|
||||
'name': '--macos-cocoa-cb',
|
||||
'desc': 'macOS libmpv backend',
|
||||
|
|
Loading…
Reference in New Issue