Skip to content

Commit 9c47424

Browse files
Work with build that does not contain pkg-config
1 parent 0e4e0f7 commit 9c47424

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

library-jni/jni/build_android.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,19 @@ function setup_paths
8383
fi
8484

8585
if [ ! -f "${PKG_CONFIG}" ]; then
86-
echo "Pkg config does not exists in path: ${PKG_CONFIG}"
86+
echo "Pkg config does not exists in path: ${PKG_CONFIG} - Probably BUG in NDK but..."
8787
set +e
8888
SYS_PKG_CONFIG=$(which pkg-config)
8989
if [ "$?" -ne 0 ]; then
90-
echo "This system does not contain system pkg-config, so we can not use it"
90+
echo "This system does not contain system pkg-config, so we can do anything"
9191
exit 1
9292
fi
9393
set -e
94-
export PKG_CONFIG=${SYS_PKG_CONFIG}
95-
echo "Because we have local pkg-config we will use it ${PKG_CONFIG}"
94+
cat > $PKG_CONFIG << EOF
95+
#!/bin/bash
96+
pkg-config \$*
97+
EOF
98+
echo "Because we have local pkg-config we will create it in ${PKG_CONFIG} directory using ${SYS_PKG_CONFIG}"
9699
fi
97100
}
98101

0 commit comments

Comments
 (0)