Commit c68c6e0d authored by Thomas Guillem's avatar Thomas Guillem

build: fix link with new libvlc.so/libvlcjni.so location

parent d02fbaad
......@@ -24,20 +24,26 @@ cp "${aar_file}" "${rootdir}"/libvlc/libvlc-3.0.0.aar
checkfail "libvlc*.arr not found"
VLC_SRC_DIR=`realpath "${rootdir}"/vlc-android/vlc`
LIBVLC_LIBS=`realpath "${rootdir}"/vlc-android/libvlc/jni/libs`
LIBVLCJNI_LIBS=`realpath "${rootdir}"/vlc-android/libvlc/jni/libs`
for project in native_sample;do
for arch in `ls ${LIBVLC_LIBS}`;do
if [ ! -f "${LIBVLC_LIBS}/${arch}/libvlcjni.so" ];then
continue
for jnilinkdir in ${LIBVLCJNI_LIBS}/*;do
arch=`basename $jnilinkdir`
if [ ! -f "${jnilinkdir}/libvlcjni.so" ];then
continue;
fi
$ANDROID_NDK/ndk-build -C "${rootdir}"/${project} \
VLC_SRC_DIR="${VLC_SRC_DIR}" \
LIBVLC_LIBS="${LIBVLC_LIBS}/${arch}" \
APP_BUILD_SCRIPT=jni/Android.mk \
APP_PLATFORM=android-9 \
APP_ABI=${arch} \
NDK_PROJECT_PATH=jni
for linkdir in ${VLC_SRC_DIR}/build-android*/ndk/libs/${arch};do
if [ ! -f "${linkdir}/libvlc.so" ];then
continue;
fi
$ANDROID_NDK/ndk-build -C "${rootdir}"/${project} \
VLC_SRC_DIR="${VLC_SRC_DIR}" \
LIBVLC_LDLIBS="-L${linkdir} -L${jnilinkdir} -lvlc -lvlcjni" \
APP_BUILD_SCRIPT=jni/Android.mk \
APP_PLATFORM=android-9 \
APP_ABI=${arch} \
NDK_PROJECT_PATH=jni
break
done
done
done
......@@ -5,7 +5,7 @@ LOCAL_MODULE := native
LOCAL_SRC_FILES := main.c
LOCAL_LDLIBS := -L${LIBVLC_LIBS} -llog -lvlcjni
LOCAL_LDLIBS := ${LIBVLC_LDLIBS} -llog
LOCAL_C_INCLUDES := $(VLC_SRC_DIR)/include
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment