13 July 2010:
- Recommend CMake version 2.8.0
6th January 2010
- Building the latest 1.7 dependencies package.
- It’s now a generic Building Ogre with Visual Studio guide, since there’s no longer a compelling reason to build from trunk.
This is my “hold-your-hand” guide to building the latest Ogre with Visual Studio C++, trunk or stable.
13 July 2010: If anyone could test this guide for Visual Studio 2010 and let me know if it works or not, I would appreciate it. I don’t have access to a Windows machine right now.
- Download and install the latest DirectX9 SDK: http://msdn.microsoft.com/en-us/directx
- Download and install CMake. It is recommended that you install version 2.8.0, later versions are known to have problems with Ogre: http://www.cmake.org/files/v2.8/
- Download the latest dependencies package: http://sourceforge.net/projects/ogre/files/ (since this post was last updated, that would be: ogre-dependencies-vc++ -> 1.7 -> OgreDependencies_MSVC_20100501.zip)
- [TRUNK] Checkout ogre from SVN: https://ogre.svn.sourceforge.net/svnroot/ogre/trunk/
- [1.7 STABLE] Checkout ogre from SVN: https://svn.ogre3d.org/svnroot/ogre/branches/v1-7 OR download a source package from: http://www.ogre3d.org/download/source
- You need to build the dependencies. Extract the Dependencies folder from the zip into the root directory (/trunk/Dependencies/). Go to Dependencies/src and open OgreDependencies.VS20xx.sln. Right click the solution and click Build Solution, which will build every project. Do this for both Release and Debug.
- Open CMake. “Where is the source code” should point to the root directory, and “Where to build the binaries” should point to a sub folder in the root directory. For example, you can create a folder named VCBuild.
- Click Configure. Choose the compiler you are building for.
- A list of options in red will appear. Configure it how you choose. I disable BUILD_PLUGIN_BSP and BUILD_RENDERSYSTEM_D3D10 since they are unnecessary for me.
- [OPTIONAL] If you have boost built and require threading, set the BOOST_ROOT value to the root of your boost directory (e.g. “C:/boost_1_39″). Subsequent boost variables should automatically be populated. (If this is an environment variable, it should automatically detect it.) Don’t forget to set CONFIG_THREADS to 1 or 2 depending on your requirements.
- Click configure once again.
- The options should turn grey. Click OK.
- Open OGRE.sln in your build directory.
- Right click the ALL_BUILD project and click Build. Do this for both Release and Debug.
- Right click the INSTALL project and click Build. Do this for both Release and Debug.
- You’re done! Make sure you direct any projects using Ogre to the generated sdk folder in your build directory.
What happened to CEGUI?
From 1.7, CEGUI is no longer part of Ogre. You should now treat it as a separate library. For instructions, refer to Building CEGUI.
What do I do next?
If you’ve not familiar with setting up an Ogre application, see my Ogre and Visual Studio Beginners FAQ and follow the walkthrough.
Let me know if you have problems with any of the steps, suggestions etc.