[vlc-commits] contrib: add meson support for iOS, macOS and tvOS

Felix Paul Kühne git at videolan.org
Wed Jan 23 19:54:34 CET 2019


vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Fri Jan 18 21:44:13 2019 +0100| [b458069b11792944972ead3517b0c548034ba56c] | committer: Felix Paul Kühne

contrib: add meson support for iOS, macOS and tvOS

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b458069b11792944972ead3517b0c548034ba56c
---

 contrib/bootstrap    | 20 +++++++++++++++++---
 contrib/src/main.mak | 22 +++++++++++++++++++---
 2 files changed, 36 insertions(+), 6 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 5f277d25e7..89534087a6 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -553,15 +553,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