[vlc-devel] [PATCH 1/6] contrib: soxr: don't enforce CMAKE_SYSTEM_NAME on android

Alexandre Janniaux ajanni at videolabs.io
Fri Nov 22 16:07:59 CET 2019


The CMake script in soxr will try to infer the current system and
setting the CMAKE_SYSTEM_NAME variable prevents CMake from finding which
system it really is and believe it's Windows. Because PKG_CONFIG_PATH
entries are separated by a semi-colon on Windows, it prevents finding
libraries like libavcodec.

This commit disable correct SIMD detection if CMAKE_ANDROID_ARCH_ABI is
not correctly set or if CMAKE_SYSTEM_PROCESSOR has an invalid value with
regard to android autodetection scripts in CMake
(Android-Determine.cmake).
---
 contrib/src/soxr/rules.mak | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/contrib/src/soxr/rules.mak b/contrib/src/soxr/rules.mak
index eaefb7c3ee..a26557b6fb 100644
--- a/contrib/src/soxr/rules.mak
+++ b/contrib/src/soxr/rules.mak
@@ -24,10 +24,13 @@ soxr: soxr-$(SOXR_VERSION)-Source.tar.xz .sum-soxr
 	$(call pkg_static,"src/soxr.pc.in")
 	$(MOVE)
 
+# CMAKE_SYSTEM_NAME is inferred from the toolchain in Android builds
+ifndef HAVE_ANDROID
 # Force CMAKE_CROSSCOMPILING to True
 ifdef HAVE_CROSS_COMPILE
 SOXR_EXTRA_CONF=-DCMAKE_SYSTEM_NAME=Generic
 endif
+endif
 
 .soxr: soxr toolchain.cmake
 	rm -f $</CMakeCache.txt
-- 
2.24.0



More information about the vlc-devel mailing list