From 7f34ca52c8338ae7d67071f35bc3745d9fcff26d Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sun, 16 Dec 2018 20:00:10 +0000 Subject: [PATCH] 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) --- builds/android/android_build_helper.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builds/android/android_build_helper.sh b/builds/android/android_build_helper.sh index e6950e6d..ea72e8ee 100644 --- a/builds/android/android_build_helper.sh +++ b/builds/android/android_build_helper.sh @@ -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}")