Problem: Android helper does not redirect pkg-config

Solution: set the appropriate options, environment variables and paths
so that the host pkg-config files are ignored, and the target ones are
used instead (if any)
This commit is contained in:
Luca Boccassi 2018-12-16 20:00:10 +00:00 committed by Luca Boccassi
parent 16af86d49c
commit 7f34ca52c8

View File

@ -260,7 +260,11 @@ function android_build_opts {
ANDROID_BUILD_OPTS+=("LDFLAGS=${LDFLAGS} ${ANDROID_BUILD_EXTRA_LDFLAGS}")
ANDROID_BUILD_OPTS+=("LIBS=${LIBS} ${ANDROID_BUILD_EXTRA_LIBS}")
ANDROID_BUILD_OPTS+=("PKG_CONFIG_LIBDIR=${ANDROID_NDK_ROOT}/prebuilt/linux-x86_64/lib/pkgconfig")
ANDROID_BUILD_OPTS+=("PKG_CONFIG_PATH=${ANDROID_BUILD_PREFIX}/lib/pkgconfig")
ANDROID_BUILD_OPTS+=("PKG_CONFIG_SYSROOT_DIR=${ANDROID_BUILD_SYSROOT}")
ANDROID_BUILD_OPTS+=("PKG_CONFIG_DIR=")
ANDROID_BUILD_OPTS+=("--with-sysroot=${ANDROID_BUILD_SYSROOT}")
ANDROID_BUILD_OPTS+=("--host=${TOOLCHAIN_HOST}")
ANDROID_BUILD_OPTS+=("--prefix=${ANDROID_BUILD_PREFIX}")