需要安装的软件
- cmake
- hg(linux上面执行:
sudo apt-get install mercurial
),windows安装:tortoisehg-4.2.2-x64 - boost可选。
下载
下载依赖和源码:hg clone https://bitbucket.org/sinbad/ogre/
和hg clone https://bitbucket.org/cabalistic/ogredeps
编译
- 先用cmake生成ogre deps依赖的vs工程文件。然后用vs打开,分别选用debug和release进行编译,ALL_BUILD和INSTALL进行编译。最好将
C:\OgreSDK\Dependencies\build\ogredeps
加入环境变量OGRE_DEPENDENCIES_DIR
。时间共30min左右。 - 再用cmake生成ogre源码的vs工程文件。在生成过程中,需要手工修改cmake configure之后,配置中的路径
OGRE_DEPENDENCIES_DIR
为:C:\OgreSDK\Dependencies\build\ogredeps
。然后用vs分别用debug和release进行编译。时间共40min左右。
检验
编程ogre源码成功后,可以运行:ogre_src\build\bin\debug
目录下的文件:SampleBrowser_d.exe。效果如图:


参考链接
来源: http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Prerequisites
来源: http://www.ogre3d.org/tikiwiki/tiki-index.php?page=CMake+Quick+Start+Guide
http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Getting+Started+With+CMake
后续的问题
建立ogre 的tutorial工程的时候总是编译不过去。

网友评论