[vlc-devel] [PATCH] contrib: add meson support for iOS and tvOS
Felix Paul Kühne
fkuehne at videolan.org
Sat Jan 19 13:34:18 CET 2019
From: Felix Paul Kühne <felix at feepk.net>
---
contrib/bootstrap | 20 +++++++++++++++++---
contrib/src/main.mak | 11 ++++++++++-
2 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/contrib/bootstrap b/contrib/bootstrap
index 763a136fe0..96c59f71fa 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -282,9 +282,23 @@ case "${OS}" in
add_make_enabled "HAVE_IOS" "HAVE_DARWIN_OS" "HAVE_BSD" "HAVE_FPU"
case "${HOST}" in
- *arm*)
- add_make_enabled "HAVE_NEON" "HAVE_ARMV7A"
- ;;
+ *armv7s*)
+ add_make "PLATFORM_SHORT_ARCH := armv7s"
+ add_make_enabled "HAVE_NEON" "HAVE_ARMV7A"
+ ;;
+ *arm*)
+ add_make "PLATFORM_SHORT_ARCH := armv7"
+ add_make_enabled "HAVE_NEON" "HAVE_ARMV7A"
+ ;;
+ *arm64*|*aarch64*)
+ add_make "PLATFORM_SHORT_ARCH := arm64"
+ ;;
+ *x86_64*)
+ add_make "PLATFORM_SHORT_ARCH := x86_64"
+ ;;
+ *86*)
+ add_make "PLATFORM_SHORT_ARCH := i386"
+ ;;
esac;
fi
if test "$BUILDFORTVOS"
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 4b3aee45fb..da03167d7f 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -553,6 +553,15 @@ crossfile.meson:
echo "[properties]" >> $@
echo "needs_exe_wrapper = true" >> $@
ifdef HAVE_CROSS_COMPILE
+ifdef HAVE_IOS
+ifdef HAVE_TVOS
+ echo "c_args = ['-isysroot', '$(IOS_SDK)', '-mtvos-version-min=10.2', '-arch', '$(PLATFORM_SHORT_ARCH)', '-fembed-bitcode']" >> $@
+ echo "c_link_args = ['-isysroot', '$(IOS_SDK)', '-arch', '$(PLATFORM_SHORT_ARCH)', '-fembed-bitcode']" >> $@
+else
+ echo "c_args = ['-isysroot', '$(IOS_SDK)', '-miphoneos-version-min=8.4', '-arch', '$(PLATFORM_SHORT_ARCH)']" >> $@
+ echo "c_link_args = ['-isysroot', '$(IOS_SDK)', '-arch', '$(PLATFORM_SHORT_ARCH)']" >> $@
+endif
+endif
echo "c_args = [ '-I$(PREFIX)/include' ]" >> $@
echo "cpp_args = [ '-I$(PREFIX)/include' ]" >> $@
echo "c_link_args = [ '-L$(PREFIX)/lib' ]" >> $@
@@ -561,7 +570,7 @@ ifdef HAVE_CROSS_COMPILE
ifdef HAVE_WIN32
echo "system = 'windows'" >> $@
else
-ifdef HAVE_IOS
+ifdef HAVE_DARWIN_OS
echo "system = 'darwin'" >> $@
else
ifdef HAVE_ANDROID
--
2.20.1
More information about the vlc-devel
mailing list