Skip to main content

History: CMake Quick Start Guide

Preview of version: 57

Image

For the impatient: Learn how to build Ogre with CMake in two minutes. If you encounter any problems or need some more advanced procedures, do read the rest of the sections below!

Introduction

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.

Done Make sure that you've sorted out the Prerequisites before attempting to build Ogre with CMake!

  1. Make sure you have downloaded, extracted and built the dependencies package
  2. Download CMake. You want the 'Win32 installer' release in the binary distribution section
  3. Run the CMake installer, install wherever you like
  4. Launch CMake via Start > Program Files > CMake 2.8 > CMake
  5. In the "Where is the source code" box, type or browse to the root directory of your OGRE source (the one that contains the OgreMain folder)
  6. In the "Where to build the binaries" box, type or browse to any folder you like - this will be where the build output will go (libraries, headers, dlls & sample exes). The folder does not have to exist yet. Note that you can run this process more than once with different output folders if you want (but we won't complicate matters now)
  7. Hit the 'Configure' button near the bottom of the screen
  8. Pick your target compiler, e.g. "Visual Studio 8 2005"
  9. Answer 'Ok' when asked if you want to create the build directory
  10. Wait for the configure process to finish
  11. The screen will now have a bunch of configuration options on it, which will be red (this is to indicate this is the first time you've seen them). You can see the potential for customising your build here, but for now just click the 'Configure' button again
  12. The values will turn grey, and the 'Generate' button at the bottom will now be enabled. Click 'Generate'
  13. Build files will now be generated in the location you picked, and CMake will say "Generating done"


That's it for CMake! You now have a set of project files that are very much like you're used to in previous versions of OGRE, in the output folder you chose. Just browse there and open the main project file (e.g. OGRE.sln). You can build as before, but there is now a special target called 'ALL_BUILD' which is a quick way to build all targets for a specific configuration. Note that all build output is now stored in a subfolder of this build folder, and not in the original OGRE source folder - so you can create multiple builds from one source directory now.

History

Information Version
Sun 27 of May, 2018 22:35 GMT-0000 paroj 67
Sun 03 of Sep, 2017 16:38 GMT-0000 paroj 66
Sun 06 of Sep, 2015 22:10 GMT-0000 dark_sylinc 65
Thu 30 of Jul, 2015 23:51 GMT-0000 holocronweaver add Android JNI build todo 64
Sat 25 of Jul, 2015 04:03 GMT-0000 holocronweaver clarify highest Android API tested 63
Sat 25 of Jul, 2015 03:44 GMT-0000 holocronweaver substantial update to Android build instructions 62
Tue 16 of Sep, 2014 07:33 GMT-0000 DanielSefton 61
Thu 07 of Aug, 2014 19:19 GMT-0000 dark_sylinc Added video tutorial 60
Thu 07 of Aug, 2014 19:16 GMT-0000 dark_sylinc Updated build instructions for Windows. They were ancient and impossible to follow by mortals 59
Mon 19 of May, 2014 19:59 GMT-0000 sajty 58
Tue 27 of Aug, 2013 21:39 GMT-0000 wolfmanfx 57
Mon 17 of Jun, 2013 19:35 GMT-0000 edoardo Updated Ant version 1.9.0 => 1.9.1 56
Fri 17 of May, 2013 20:34 GMT-0000 edoardo And of course I forgot to update the output of the new ant command, now it's done 55
Fri 17 of May, 2013 20:29 GMT-0000 edoardo "apache-ant-1.8.4-bin.zip" doesn't exist anymore, plus the link had a double slash typo 54
Fri 29 of Mar, 2013 15:39 GMT-0000 Emerich 53
Fri 29 of Mar, 2013 15:38 GMT-0000 Emerich 52
Fri 22 of Feb, 2013 06:36 GMT-0000 c6burns updated dependency link to newer binaries (that include optimizer) 51
Fri 22 of Feb, 2013 04:06 GMT-0000 c6burns note that step 6 is optional 50
Thu 21 of Feb, 2013 21:53 GMT-0000 xavier 49
Thu 21 of Feb, 2013 21:53 GMT-0000 xavier 48
Thu 21 of Feb, 2013 21:51 GMT-0000 xavier 47
Thu 21 of Feb, 2013 21:43 GMT-0000 xavier 46
Thu 21 of Feb, 2013 20:34 GMT-0000 xavier 45
Wed 28 of Nov, 2012 11:30 GMT-0000 wolfmanfx 44
Sun 09 of Sep, 2012 22:16 GMT-0000 wolfmanfx 43