- Use your own cross-compiler for Android, or export the one from the
NDK:
- /usr/src/android-ndk-r7/build/tools/make-standalone-toolchain.sh \
+ /usr/src/android-ndk-r7c/build/tools/make-standalone-toolchain.sh \
--platform=android-9 \
--install-dir=/usr/src/ndk-standalone-9
- Use your own cross-compiler for Android, or export the one from the
NDK:
- /usr/src/android-ndk-r7/build/tools/make-standalone-toolchain.sh \
+ /usr/src/android-ndk-r7c/build/tools/make-standalone-toolchain.sh \
--platform=android-9 \
--install-dir=/usr/src/ndk-standalone-9
cd cross-android-toolchain/
cmake \
-D CMAKE_TOOLCHAIN_FILE=../android_toolchain.cmake \
- -D CMAKE_INSTALL_PREFIX=/usr/src/ndk-standalone-9 \
+ -D CMAKE_INSTALL_PREFIX=/usr/src/ndk-standalone-9/sysroot/usr \
-D FREEGLUT_GLES2=ON \
-D FREEGLUT_BUILD_DEMOS=NO \
..
For instance if you use the autotools:
PATH=/usr/src/ndk-standalone-9/bin:$PATH
- export PKG_CONFIG_PATH=/usr/src/ndk-standalone-9/share/pkgconfig
+ export PKG_CONFIG_PATH=/usr/src/ndk-standalone-9/sysroot/usr/share/pkgconfig
./configure --host=arm-linux-androideabi --prefix=/somewhere
make
make install
'android_toolchain.cmake':
PATH=/usr/src/ndk-standalone-9/bin:$PATH
- export PKG_CONFIG_PATH=/usr/src/ndk-standalone-9/share/pkgconfig
+ export PKG_CONFIG_PATH=/usr/src/ndk-standalone-9/sysroot/usr/share/pkgconfig
cp .../android_toolchain.cmake .
mkdir cross-android/
cd cross-android/