zoukankan      html  css  js  c++  java
  • 如何在Windows下使用CMake 2.8.2生成Ogre 1.7.1工程文件

    为了实现跨平台和提高可移植性,OGRE从1.7开始使用CMake生成工程文件。本文将向读者介绍如何在Windows下使用CMake 2.8.2生成Ogre 1.7.1工程文件。

    在工作开始之前,请先下载下述的源代码包、依赖包和工具包。

    1、ogre_src_v1-7-1.exe:

    https://sourceforge.net/projects/ogre/files/ogre/1.7/ogre_src_v1-7-1.exe/download

    2、Microsoft Visual C++ Dependencies Package:

    http://sourceforge.net/projects/ogre/files/ogre-dependencies-vc%2B%2B/1.7/OgreDependencies_MSVC_20100501.zip/download

    3、CMake-2.8.2-win32-x86.exe:

    http://www.CMake.org/CMake/resources/software.html

    将Ogre的源代码包(ogre_src_v1-7-1.exe)解压到本地硬盘,注意CMake对中文的支持不好,所以解压路径中最好不要有中文。我们假设这个解压路径为D:\OGRE_SDK\ ogre_src_v1-7-1。同理,将依赖包(OgreDependencies_MSVC_20100501.zip)解压到D:\OGRE_SDK\Dependencies下,编译这个目录中的工程。然后,安装CMake 2.8.2

    打开CMake,在Where is the source code处填入D:\OGRE_SDK\ogre_src_v1-7-1,在Where to build the binaries处填入要生成的工程目录,方便区分我新建文件夹D:\OGRE_SDK\Build。
    点击“Configure”按钮,弹出的窗口选择开发环境,我选择VS2008(VC9),CMake开始检测并生成工程文件。在生成的过程中会出现下面的错误提示。
    Error_2010-11-02_09-59-08

    分析日志:
    CMake Error at CMake/Utils/MacroLogFeature.CMake:100 (MESSAGE):
    -----------------------------------------------------------------------------
    -- The following REQUIRED packages could NOT be located on your system.
       -- Please install them before continuing this software installation.
       -- If you are in Windows, try passing -DOGRE_DEPENDENCIES_DIR=<path to
    dependencies>
    -----------------------------------------------------------------------------
    + freetype: Portable font engine <http://www.freetype.org>  
    -----------------------------------------------------------------------------
    Call Stack (most recent call first):
    CMake/Dependencies.CMake:203 (MACRO_DISPLAY_FEATURE_LOG)
    CMakeLists.txt:157 (include)

    按照指示手动指定OGRE_DEPENDENCIES_DIR的路径(就是依赖包的解压路径)。再次按下“Configure”按钮。没有错误提示。列表中红色的条目表示是第一次生成的条目,确认配置更改好后,再次按下“Configure”。这时,按下“Generate”即可。

    最后去D:\OGRE_SDK\Build中确认生成成功。

    Build_2010-11-02_11-11-49

  • 相关阅读:
    [Violet]天使玩偶/SJY摆棋子
    语音识别终极教程
    语音识别
    转:awesome-lane-detection
    转:awesome-object-detection
    转:Awesome
    转:Awesome Image/Video segmentation
    转:目标检测算法总结
    转:10行代码实现物体检测
    转:词向量word2vector那些事儿
  • 原文地址:https://www.cnblogs.com/lilei9110/p/1866954.html
Copyright © 2011-2022 走看看