1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-16 12:17:12 +00:00

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.
This commit is contained in:
der richter 2024-10-06 16:55:38 +02:00 committed by Kacper Michajłow
parent 2fb8b00ac9
commit 20b7f96ab3

View File

@ -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',