This guide is designed to get you building OGRE from source with the default settings in the shortest possible time, showing you the barest minimum of CMake to do that, and minus any real discussion. Remember that there is a lot more to the hows and whys of this process, so it's a good idea to go back to the Getting Started With CMake page and read the whole thing when you have time.
We assume here that you've already downloaded / extracted the OGRE source code into a folder on your local machine. From here, go to the section for your platform.
Make sure that you've sorted out the Prerequisites before attempting to build Ogre with CMake!
- Download Ogre Source (Instructions below assume current version of 1.8.0, update as needed)
tar xjf ogre_src_v1-8-0.tar.bz2
- Move to source directory:
- Create build directory:
- Move into build directory:
- Trigger cmake, passing path to Ogre source directory:
cmake ..See the Extensive CMake page for a list of compilation options which can be passed to CMake at this stage, and Getting Started With CMake for even more background material. N.B. Please note that OGRE_CONFIG_THREADS = 1 is not supported on Linux.
- If the CMake results look good, build Ogre:
make -j2The -j2 specifies how many parallel compilation jobs to run. Substitute the number of processor cores on your system, e.g. -j2 for a dual-core, -j4 for a quad core...
- Once compilation is successful, you can install into the system (by default, /usr/local):
sudo make install