I just use create_project.py create a new project. My CMake is 2.8-12. Then I run “cmake .” command and got error
RockLeematoMacBook-Pro:TestCMake rocklee$ cmake .
– The C compiler identification is Clang 5.0.0
– The CXX compiler identification is Clang 5.0.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
Using chipmunk …
You have called ADD_LIBRARY for library audio without any source files. This typically indicates a problem with your CMakeLists.txt file
– Configuring done
CMake Error: CMake can not determine linker language for target: audio
CMake Error: CMake can not determine linker language for target: audio
CMake Error: Cannot determine link language for target “audio”.
– Generating done
And I check the cmakelists.txt with audio directory.
audio
add_subdirectory(${COCOS2D_ROOT}/cocos/audio)
It seems no error.
So I delete this line. Then cmake running right.
why?