When I try to build Assimp by running build_ios.sh
, it tells me:
CMake Error: your C compiler: "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: your CXX compiler: "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
What I need the path to be is:
/Applications/XCode.app/Contents/Developer/Platforms/...
I've tried changing DEVROOT
in build_ios.sh
and IPHONE_xxxx_TOOLCHAIN.cmake
, because that's what CMAKE_C_COMPILER
etc seem to get generated from, but it still gives me the same errors.
Option 1:
You can set CMake variables at command line like this:
See this to learn how to create a CMake cache entry.
Option 2:
In your shell script
build_ios.sh
you can set environment variablesCC
andCXX
to point to your C and C++ compiler executable respectively, example:Option 3:
Edit the CMakeLists.txt file of "Assimp": Add these lines at the top (must be added before you use
project()
orenable_language()
command)See this to learn how to use
set
command in CMake. Also this is a useful resource for understanding use of some of the common CMake variables.Here is the relevant entry from the official FAQ: http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_use_a_different_compiler.3F
The cc and cxx is located inside
/Applications/Xcode.app
. This should find the right paths