Unknown command "ogre_config_sample_lib" when cmake samples of OGRE
An error of Unknown CMake command "ogre_config_sample_lib"
happens when I tried to use cmake in OGRE Sample folders after installing OGRE. I had taken the following steps before this error happened:
cd
to the folder Sample/Smoke
, and mkdir
a new directory named build
and cd
there. Run cmake ..
after that and meet the error then.
Here's the detail information of my error:
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check f开发者_开发知识库or working C compiler: /usr/lib/ccache/gcc
-- Check for working C compiler: /usr/lib/ccache/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/c++
-- Check for working CXX compiler: /usr/lib/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:10 (ogre_config_sample_lib):
Unknown CMake command "ogre_config_sample_lib".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 2.8)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
tibur is correct in that you are not supposed to run cmake from there. Do what you did, but in the root of the SDK dir.
You probably not supposed to run CMake from that directory. Try to run it for the whole Sample
directory. If it doesn't work either, check where that ogre_config_sample_lib
command is defined.
In the root ogre directory there is .bat file that will compile the samples for you. I also tried doing cmake from src and other directories and got the same error, but the .bat file compiled all the samples for me easily.
精彩评论