0

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 for 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!
4

3 回答 3

2

tibur 是正确的,因为您不应该从那里运行 cmake。做你所做的,但在 SDK 目录的根目录中。

于 2012-11-20T21:20:00.353 回答
1

您可能不应该从该目录运行 CMake。尝试为整个Sample目录运行它。如果它也不起作用,请检查该ogre_config_sample_lib命令的定义位置。

于 2011-07-14T12:04:10.473 回答
0

在根 ogre 目录中有一个 .bat 文件,它将为您编译示例。我还尝试从 src 和其他目录执行 cmake 并得到相同的错误,但 .bat 文件很容易为我编译了所有示例。

于 2013-01-12T02:54:43.027 回答