From 20b7f96ab31c0f6cab88dd34128b01c1bd8d0d21 Mon Sep 17 00:00:00 2001 From: der richter Date: Sun, 6 Oct 2024 16:55:38 +0200 Subject: [PATCH] meson: error out when swift unavailable or disabled and cplayer enabled without swift mpv as a standalone app is unusable on macOS, since the cocoa main main loop doesn't exists. furthermore most of the other needed functionalities like video outputs, contexts, platform features, etc are also missing. without swift mpv is really only usable as libmpv. --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meson.build b/meson.build index 2e0b705ae2..1b56eb4713 100644 --- a/meson.build +++ b/meson.build @@ -1540,6 +1540,10 @@ swift = get_option('swift-build').require( ) features += {'swift': swift.allowed()} +if features['cocoa'] and not features['swift'] and get_option('cplayer') + error('cplayer enabled but no suitable swift version could be found or was disabled!') +endif + swift_sources = [] if features['cocoa'] and features['swift'] swift_sources += files('osdep/mac/application.swift',