diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:13:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:13:14 +0000 |
commit | 60e8a3d404f0640fa5a3f834eae54b4f1fb9127d (patch) | |
tree | 1da89a218d0ecf010c67a87cb2f625c4cb18e7d7 /osdep/mac/meson.build | |
parent | Adding upstream version 0.37.0. (diff) | |
download | mpv-60e8a3d404f0640fa5a3f834eae54b4f1fb9127d.tar.xz mpv-60e8a3d404f0640fa5a3f834eae54b4f1fb9127d.zip |
Adding upstream version 0.38.0.upstream/0.38.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | osdep/mac/meson.build (renamed from osdep/meson.build) | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/osdep/meson.build b/osdep/mac/meson.build index 21baafc..8ddbdba 100644 --- a/osdep/meson.build +++ b/osdep/mac/meson.build @@ -1,8 +1,8 @@ # custom swift targets -bridge = join_paths(source_root, 'osdep/macOS_swift_bridge.h') -header = join_paths(build_root, 'osdep/macOS_swift.h') -module = join_paths(build_root, 'osdep/macOS_swift.swiftmodule') -target = join_paths(build_root, 'osdep/macOS_swift.o') +bridge = join_paths(source_root, 'osdep/mac/app_bridge_objc.h') +header = join_paths(build_root, 'osdep/mac/swift.h') +module = join_paths(build_root, 'osdep/mac/swift.swiftmodule') +target = join_paths(build_root, 'osdep/mac/swift.o') swift_flags = ['-frontend', '-c', '-sdk', macos_sdk_path, '-enable-objc-interop', '-emit-objc-header', '-parse-as-library'] @@ -19,10 +19,22 @@ if get_option('optimization') != '0' swift_flags += '-O' endif +if macos_cocoa_cb.allowed() + swift_flags += ['-D', 'HAVE_MACOS_COCOA_CB'] +endif + +if macos_touchbar.allowed() + swift_flags += ['-D', 'HAVE_MACOS_TOUCHBAR'] +endif + +if macos_media_player.allowed() + swift_flags += ['-D', 'HAVE_MACOS_MEDIA_PLAYER'] +endif + extra_flags = get_option('swift-flags').split() swift_flags += extra_flags -swift_compile = [swift_prog, swift_flags, '-module-name', 'macOS_swift', +swift_compile = [swift_prog, swift_flags, '-module-name', 'swift', '-emit-module-path', '@OUTPUT0@', '-import-objc-header', bridge, '-emit-objc-header-path', '@OUTPUT1@', '-o', '@OUTPUT2@', '@INPUT@', '-I.', '-I' + source_root, @@ -31,7 +43,7 @@ swift_compile = [swift_prog, swift_flags, '-module-name', 'macOS_swift', swift_targets = custom_target('swift_targets', input: swift_sources, - output: ['macOS_swift.swiftmodule', 'macOS_swift.h', 'macOS_swift.o'], + output: ['swift.swiftmodule', 'swift.h', 'swift.o'], command: swift_compile, ) sources += swift_targets |