mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
contrib: use cmake Android cross-compilation infrastructure
Prevents cmake from trying to use the system toolchain on macOS. Change-Id: Ia4890ce07e10395832fb3c9ecbab8cea8e637826 Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
This commit is contained in:
@ -475,10 +475,11 @@ endif
|
||||
ifdef HAVE_CROSS_COMPILE
|
||||
echo "set(_CMAKE_TOOLCHAIN_PREFIX $(CROSS_COMPILE))" >> $@
|
||||
ifdef HAVE_ANDROID
|
||||
# cmake will overwrite our --sysroot with a native (host) one on Darwin
|
||||
# Set it to "" right away to short-circuit this behaviour
|
||||
echo "set(CMAKE_CXX_SYSROOT_FLAG \"\")" >> $@
|
||||
echo "set(CMAKE_C_SYSROOT_FLAG \"\")" >> $@
|
||||
echo "set(CMAKE_SYSTEM_NAME Android)" >> $@
|
||||
echo "set(CMAKE_ANDROID_STANDALONE_TOOLCHAIN \"$(ANDROID_TOOLCHAIN)\")" >> $@
|
||||
echo "set(CMAKE_ANDROID_ARCH_ABI $(ANDROID_ABI))" >> $@
|
||||
echo "set(CMAKE_SYSTEM_VERSION $(subst android-,,$(ANDROID_API)))" >> $@
|
||||
echo "set(CMAKE_ANDROID_STL_TYPE c++_static)" >> $@
|
||||
endif
|
||||
endif
|
||||
echo "set(CMAKE_C_COMPILER $(CC))" >> $@
|
||||
|
Reference in New Issue
Block a user