taka-no-me / android-cmake

CMake toolchain file and other scripts for the Android NDK
1.22k stars 438 forks source link

android-cmake cant find android-ndk-r9 even though its in env #6

Closed bjornstromberg closed 9 years ago

bjornstromberg commented 11 years ago

so i found this great little cmake toolchain, but i just cant get it to work with mysql connector c,

ANDROID_NDK_TOOLCHAIN_TOOLS_PREFIX=arm-linux-androideabi ANDROID_NDK_ROOT=/home/stingray/Qt/android-ndk-r9/ ANDROID_NDK_HOST=Linux-x86 ANDROID_NATIVE_API_LEVEL=android-14 ANDROID_NDK_TOOLCHAIN_PREFIX=arm-linux-androideabi ANDROID_ABI=armeabi ANDROID_NDK_PLATFORM=android-18 ANDROID_NDK_TOOLCHAIN_VERSION=4.8 ANDROID_CMAKE=/home/stingray/src/android/r9/r9/android.toolchain.cmake ANDROID_NDK=/home/stingray/Qt/android-ndk-r9/ ANDROID_STANDALONE_TOOLCHAIN=/usr/arm-linux-androideabi-4.8/

and here comes the output from cmake-gui: Running cmake version 2.8.10.1 CMake Error at /home/stingray/src/android/r9/android.toolchain.cmake:554 (message): Could not find neither Android NDK nor Android standalone toolchain.

You should either set an environment variable:

export ANDROID_NDK=~/my-android-ndk

or

export ANDROID_STANDALONE_TOOLCHAIN=~/my-android-toolchain

or put the toolchain or NDK in the default path:

sudo ln -s ~/my-android-ndk /opt/android-ndk

sudo ln -s ~/my-android-toolchain /opt/android-toolchain Call Stack (most recent call first): /usr/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:89 (include) CMakeLists.txt:99 (PROJECT)

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_C_COMPILER_ENV_VAR CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_C_COMPILER CMake Error: Could not find cmake module file:/home/stingray/src/mysql-connector-c-6.1.1-src/build/CMakeFiles/2.8.10.1/CMakeCCompiler.cmake CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_CXX_COMPILER_ENV_VAR CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_CXX_COMPILER CMake Error: Could not find cmake module file:/home/stingray/src/mysql-connector-c-6.1.1-src/build/CMakeFiles/2.8.10.1/CMakeCXXCompiler.cmake CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage Configuring incomplete, errors occurred!

so a little hint on how to use the toolchain would be nice if i missed something?

taka-no-me commented 9 years ago

Lets close as outdated. Anyway it is not a good idea to specify paths to NDK and standalone toolchain at the same time.