[vlc-commits] contrib: add meson support for iOS, macOS and tvOS
Felix Paul Kühne
git at videolan.org
Wed Jan 23 20:01:15 CET 2019
vlc/vlc-3.0 | branch: master | Felix Paul Kühne <felix at feepk.net> | Fri Jan 18 21:44:13 2019 +0100| [563b25c5c197a20a9479fd7d04f5582f97941375] | committer: Felix Paul Kühne
contrib: add meson support for iOS, macOS and tvOS
(cherry picked from commit b458069b11792944972ead3517b0c548034ba56c)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=563b25c5c197a20a9479fd7d04f5582f97941375
---
contrib/bootstrap | 20 +++++++++++++++++---
contrib/src/main.mak | 22 +++++++++++++++++++---
2 files changed, 36 insertions(+), 6 deletions(-)
diff --git a/contrib/bootstrap b/contrib/bootstrap
index 20ce524926..b7cab040a5 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -303,9 +303,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 b6656a5376..cbd7a2eba8 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -539,15 +539,31 @@ crossfile.meson:
echo "[properties]" >> $@
echo "needs_exe_wrapper = true" >> $@
ifdef HAVE_CROSS_COMPILE
- echo "c_args = [ '-I$(PREFIX)/include' ]" >> $@
echo "cpp_args = [ '-I$(PREFIX)/include' ]" >> $@
- echo "c_link_args = [ '-L$(PREFIX)/lib' ]" >> $@
echo "cpp_link_args = [ '-L$(PREFIX)/lib' ]" >> $@
+ifdef HAVE_DARWIN_OS
+ifdef HAVE_IOS
+ifdef HAVE_TVOS
+ echo "c_args = ['-I$(PREFIX)/include', '-isysroot', '$(IOS_SDK)', '-mtvos-version-min=10.2', '-arch', '$(PLATFORM_SHORT_ARCH)', '-fembed-bitcode']" >> $@
+ echo "c_link_args = ['-L$(PREFIX)/lib', '-isysroot', '$(IOS_SDK)', '-arch', '$(PLATFORM_SHORT_ARCH)', '-fembed-bitcode']" >> $@
+else
+ echo "c_args = ['-I$(PREFIX)/include', '-isysroot', '$(IOS_SDK)', '-miphoneos-version-min=8.4', '-arch', '$(PLATFORM_SHORT_ARCH)']" >> $@
+ echo "c_link_args = ['-L$(PREFIX)/lib', '-isysroot', '$(IOS_SDK)', '-arch', '$(PLATFORM_SHORT_ARCH)']" >> $@
+endif
+endif
+ifdef HAVE_MACOSX
+ echo "c_args = ['-I$(PREFIX)/include', '-isysroot', '$(MACOSX_SDK)', '-mmacosx-version-min=10.10', '-arch', '$(ARCH)']" >> $@
+ echo "c_link_args = ['-L$(PREFIX)/lib', '-isysroot', '$(MACOSX_SDK)', '-arch', '$(ARCH)']" >> $@
+endif
+else
+ echo "c_args = [ '-I$(PREFIX)/include' ]" >> $@
+ echo "c_link_args = [ '-L$(PREFIX)/lib' ]" >> $@
+endif
echo "[host_machine]" >> $@
ifdef HAVE_WIN32
echo "system = 'windows'" >> $@
else
-ifdef HAVE_IOS
+ifdef HAVE_DARWIN_OS
echo "system = 'darwin'" >> $@
else
ifdef HAVE_LINUX
More information about the vlc-commits
mailing list