当cmake OGRE的样本时,未知命令“ogre_config_sample_lib”

时间:2011-07-14 08:57:15

标签: cmake ogre3d ogre

在安装OGRE后尝试在OGRE Sample文件夹中使用cmake时发生Unknown CMake command "ogre_config_sample_lib"错误。在发生此错误之前,我已采取以下步骤:

cdSample/Smoke文件夹,mkdir在那里有一个名为buildcd的新目录。之后运行cmake ..然后遇到错误。

以下是我的错误的详细信息:

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

3 个答案:

答案 0 :(得分:2)

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

答案 1 :(得分:1)

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

答案 2 :(得分:0)

在根ogre目录中有.bat文件,它将为您编译样本。我也试过从src和其他目录做cmake并得到同样的错误,但.bat文件很容易为我编译了所有样本。