From 5943f9d669f4b6bd3cd1b578c184d01b724a6abf Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 18 Jul 2023 22:03:29 +0530 Subject: [PATCH] meson: Add a native file for macOS x86_64/arm64 This also supports Homebrew and Qt5 Part-of: --- data/{cross-files => machine-files}/README.md | 0 .../android_arm64-cross-file.ini} | 0 data/machine-files/macos-native-file.ini | 66 +++++++++++++++++++ .../mingw_w64_x86-64-cross-file.ini} | 0 4 files changed, 66 insertions(+) rename data/{cross-files => machine-files}/README.md (100%) rename data/{cross-files/android_arm64.txt => machine-files/android_arm64-cross-file.ini} (100%) create mode 100644 data/machine-files/macos-native-file.ini rename data/{cross-files/mingw_w64_x86-64.txt => machine-files/mingw_w64_x86-64-cross-file.ini} (100%) diff --git a/data/cross-files/README.md b/data/machine-files/README.md similarity index 100% rename from data/cross-files/README.md rename to data/machine-files/README.md diff --git a/data/cross-files/android_arm64.txt b/data/machine-files/android_arm64-cross-file.ini similarity index 100% rename from data/cross-files/android_arm64.txt rename to data/machine-files/android_arm64-cross-file.ini diff --git a/data/machine-files/macos-native-file.ini b/data/machine-files/macos-native-file.ini new file mode 100644 index 0000000000..cb857bd234 --- /dev/null +++ b/data/machine-files/macos-native-file.ini @@ -0,0 +1,66 @@ +[constants] +macosx_sdk = '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' +macosx_minver = '10.13' +common_args = ['--sysroot=' + macosx_sdk, '-mmacosx-version-min=' + macosx_minver, '-F' + macosx_sdk / 'System/Library/Frameworks'] +qt_prefix = HOME_DIR / 'Qt/5.15.2/clang_64' +# Uncomment for x86 macs: +#homebrew_prefix = '/usr/local' +# Uncomment for arm64 macs: +homebrew_prefix = '/opt/homebrew' +openssl_pc = homebrew_prefix / 'opt/openssl@1.1/lib/pkgconfig' +vpx_pc = homebrew_prefix / 'opt/libvpx/lib/pkgconfig' + +[built-in options] +c_args = common_args +cpp_args = common_args +objc_args = common_args +objcpp_args = common_args +c_link_args = common_args +cpp_link_args = common_args +objc_link_args = common_args +objcpp_link_args = common_args +pkg_config_path = [openssl_pc, vpx_pc] +force_fallback_for = ['zlib', 'libffi'] + +[project options] +rs = 'enabled' +libnice = 'enabled' +tls = 'enabled' +introspection = 'disabled' +python = 'disabled' +qt5 = 'disabled' + +[gst-plugins-base:project options] +gl = 'enabled' +pango = 'enabled' + +[gst-plugins-bad:project options] +applemedia = 'enabled' +webrtc = 'enabled' +dtls = 'enabled' +sctp = 'enabled' +srtp = 'enabled' + +[gst-plugins-good:project options] +cairo = 'enabled' +soup = 'enabled' +soup-lookup-dep = 'true' +qt-method = 'qmake' +osxaudio = 'enabled' +vpx = 'enabled' + +[gst-plugins-rs:project options] +gtk4 = 'enabled' + +[gtk:project options] +x11-backend = 'false' + +[binaries] +qmake = qt_prefix / 'bin/qmake' +pkgconfig = homebrew_prefix / 'opt/pkg-config/bin/pkg-config' +# cmake has horribly broken behaviour where it will hunt your +# /Library/Frameworks for dependencies like zlib with no way to disable it, +# which means if you have a gstreamer prefix, you will end up picking up all +# headers from it at compile time (but not configure time). So just disable +# picking up deps with cmake entirely. +cmake = 'false' diff --git a/data/cross-files/mingw_w64_x86-64.txt b/data/machine-files/mingw_w64_x86-64-cross-file.ini similarity index 100% rename from data/cross-files/mingw_w64_x86-64.txt rename to data/machine-files/mingw_w64_x86-64-cross-file.ini