<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://cegui.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Underworldguardian</id>
		<title>CEGUI Wiki - Crazy Eddie's GUI System (Open Source) - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://cegui.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Underworldguardian"/>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/Special:Contributions/Underworldguardian"/>
		<updated>2026-05-02T00:05:47Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Building_CEGUI_for_Ogre_/_OgreRenderer&amp;diff=5614</id>
		<title>Building CEGUI for Ogre / OgreRenderer</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Building_CEGUI_for_Ogre_/_OgreRenderer&amp;diff=5614"/>
				<updated>2015-02-13T11:26:18Z</updated>
		
		<summary type="html">&lt;p&gt;Underworldguardian: Added the most straight-forward way to compile a cmake project.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{VersionBadge|0.7}}&lt;br /&gt;
{{VersionBadge|0.8}}&lt;br /&gt;
&lt;br /&gt;
= General =&lt;br /&gt;
Since Ogre version 1.7 the CEGUI library isn't an Ogre dependency anymore and was replaced by a very simple UI overlay mainly used for the Ogre demos. Users now have to compile the CEGUI library against Ogre on their own, to use CEGUI together with Ogre. This guide has been created to help users building CEGUI against Ogre. We recommend CMake 2.8.X for all version of CEGUI at the moment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tested versions ==&lt;br /&gt;
* CEGUI 0.8 supports basic configurations of Ogre 1.7 and 1.8 and 1.9. Other versions and special configurations (such as using boost) are supported but might require additional steps from your side.&lt;br /&gt;
* CEGUI v-0 branch and releases starting with 0.8.4 will support Ogre 1.7, 1.8, 1.9. They will also be updated from time to time to support the current version of Ogre default branch (right now it works with the Ogre default branch version of 6th Jan. 2014, including Ogre's OGL3 Renderer)&lt;br /&gt;
* CEGUI default branch is currently not containing a functional OgreRenderer and is not recommended to be used by Ogre users until the new OgreRenderer is finished&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If somebody wants to use CEGUI from v0-8 together with Ogre's Direct3D 11 Renderer urgently, we can try to help you modify the CEGUIOgreRenderer for D3D 11 compatibilities - with strong pre-existing knowledge about hlsl it shouldn't take longer than 1 hour with our help.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Environment variables for CMake ==&lt;br /&gt;
If you installed Ogre (or OIS or Boost), then certain environment variables might have been set on your computer already, helping CMake find your Ogre version (or OIS or boost). Here are some examplatory paths from my computer:&lt;br /&gt;
* OIS_HOME - A:/Libraries&lt;br /&gt;
* OGRE_HOME - A:/Libraries/OgreFromSourceCode (alternatively, if you use an SDK and do not compile from source, for example use: A:/Libraries/OgreSDK )&lt;br /&gt;
* OGRE_SDK - A:/Libraries/OgreFromSourceCode/build (alternatively, if you use an SDK and do not compile from source, for example use: A:/Libraries/OgreSDK )&lt;br /&gt;
* Boost looks for C:/Boost and if nothing is there it looks for BOOST_ROOT env variable: http://stackoverflow.com/a/8770217/3144964&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to acquire the CEGUI source code ==&lt;br /&gt;
Here are all the links you will need to build CEGUI and its dependencies - which is the recommended approach:&lt;br /&gt;
* Visit the [http://static.cegui.org.uk/docs/current/downloading.html reference manual] for instructions on obtaining the latest CEGUI source code (be sure to be on a '''stable branch''', for example v0-8) - this is the recommended approach as it will include the latest fixes.&lt;br /&gt;
'''Note''': If the branch version's source code seems to be unstable or not working, you can try the [http://sourceforge.net/projects/crayzedsgui/files/latest/download?source=files latest stable release] or select a Release version from the [http://cegui.org.uk/download downloads page].&lt;br /&gt;
* '''Additionally''' to the CEGUI source code you will need [http://sourceforge.net/projects/crayzedsgui/files/CEGUI%20Mk-2%20Dependencies/0.8.x/cegui-deps-0.8.x-src.zip/download the source code of the CEGUI dependencies]. Download it and build the dependencies on your system (debug &amp;amp; release modes are common and are recommended to be built). You can use this document as guideline for the building process if needed: [http://static.cegui.org.uk/docs/current/building_deps.html Building dependencies]. Move the &amp;quot;dependencies&amp;quot; folder, which should have been created during the build process and should contain the headers, .lib files and .dll files, into your CEGUI main folder, so that it will co-exist next to the folders &amp;quot;bin&amp;quot;, &amp;quot;cegui&amp;quot;, &amp;quot;datafiles&amp;quot; etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A snapshot of using CMake ==&lt;br /&gt;
CMake has a great GUI that allows to change your project's configuration by specifiying the dependencies, renderers and parsers you want. You need to fill out the paths to all files and folders the dependencies require.&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
''' Expand this to see an example on how to utilise the filters/search in CMake and how to set the Ogre variables'''&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
{{[[File:Ogrescreen.png|How to set CMake variables]]}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
''' Expand this for an example of fully set boost variables based on a boost binary release. Reminder: For Ogre you only need thze include folder and the &amp;quot;system&amp;quot; and &amp;quot;thread&amp;quot; libraries.'''&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
{{[[File:Boostconfig.png|How to set CMake Boost variables]]}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Step-by-step guide =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Important:''' If you make a mistake such as confusing Debug and Release paths and you already clicked &amp;quot;Configure&amp;quot; again, then please trigger &amp;quot;Delete Cache&amp;quot; (File-&amp;gt;Delete Cache) in Cmake and start from 0 again!&lt;br /&gt;
Also we recommend you to switch on the &amp;quot;Advanced&amp;quot; and &amp;quot;Grouped&amp;quot; checkboxes.&lt;br /&gt;
* 1. Get the appropriate '''CEGUI''' version from the CEGUI download page or get the very latest CEGUI version from the SVN repository (see links and info above).&lt;br /&gt;
&lt;br /&gt;
* 2. Get the latest '''Ogre''' version. If you are build it yourself (recommended), you will need to compile/link it first in the modes you want to use (Debug/Release) to get Ogre's .lib and .dll files ready for CEGUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps for Microsoft Visual Studio ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===CEGUI 0.8.x ===&lt;br /&gt;
* 3. Open the CMake GUI Utility&lt;br /&gt;
* 4. Set the '''source path''' to the directory where your CEGUI files are located (e.g. C:/CEGUI - contains folders like 'cegui' 'cmake' 'datafiles', etc. )&lt;br /&gt;
* 5. Set the '''build path''' to the directory where you want CMake to generate your build configuration(e.g. C:/CEGUI/build)&lt;br /&gt;
* 6. Press the '''Configure''' button. At this stage CMake will ask you for a generator for this project(e.g. Visual Studio 10) and then will try to find the required packages needed by CEGUI. Please note that you should have the CEGUI dependencies built and installed in your CEGUI_ROOT directory. E.g. if your CEGUI directory is C:/CEGUI then the dependencies would be expected to be in C:/CEGUI/dependencies by default&lt;br /&gt;
* 7. Search the '''CEGUI_BUILD_RENDERER_OGRE''' boolean variable in the list of CMake GUI Utility and set the value to TRUE by clicking on the checkbox. &lt;br /&gt;
* 8. Check if OGRE and OIS (and boost - '''IF''' your Ogre version was built with boost as dependency) were found by cmake. (For more information about how boost can be found by CMake please see the Cmake docu: http://www.cmake.org/cmake/help/git-master/module/FindBoost.html) Look through the CMake GUI Utility output to see if there is a message like 'Could NOT find OGRE'. '''If both Ogre and OIS (and boost) were found (and reference the right version in case you got multiple ones) you can jump to step #9 now'''. &amp;lt;span style=&amp;quot;color:#3333AA&amp;quot;&amp;gt;  If this was not the case it means that you either have not set the environment variables for Ogre (OGRE_SDK and OGRE_HOME) and OIS (OIS_HOME) at all, or that you have not set them correctly. You can try to fix this and click configure again to see if it works. If it does you can skip to #9. If it does not work then set the paths yourself.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
''' Expand this field to get a very elaborate explanation on the CMake settings for Ogre, OIS and Boost including examplatory paths: '''&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
{{BUILD_OGRE_FOR_CEGUI_0_8_HELP}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 9 After you changed all the CMake settings to your liking (deactivating/activating Image codecs, parsers, renderer, etc.) you have to rerun '''Configure'''. You need to do this in order to save your additional variables in the CMake cache and in the build configuration.&lt;br /&gt;
* 10 Press the '''Generate''' button. At this stage CMake will read your build configuration and then generate a solution using your selected generator.&lt;br /&gt;
* 11 Go to the cegui build directory and open the Visual Studio solution '''cegui.sln'''&lt;br /&gt;
* 12 Build the entire cegui solution.&lt;br /&gt;
* 13 (Optional) Start the SampleBrowser to see if the samples work correctly (don't forget to copy the created samples.xml from build/datafiles/samples to your datafiles/samples folder so that the SampleBrowser can find the samples you want to use. Also make sure you copied all the dlls that your setup requires to the foldering containing the SampleBrowser.exe and in Visual Studio: for Project-&amp;gt;Properties-&amp;gt;Debugging-&amp;gt;Working Directory set the value to $(OutDir) )&lt;br /&gt;
&lt;br /&gt;
===CEGUI 0.7.x ===&lt;br /&gt;
* 3. In your CEGUI folder there should be a folder called &amp;quot;'''projects'''&amp;quot; with a subfolder called &amp;quot;'''premake'''&amp;quot;. It is recommended to use the [https://sourceforge.net/projects/crayzedsgui/files/CEGUI%20Mk-2/premake/premake-3.7-custom.zip/download custom premake version of CEGUI]. Otherwise you can get version 3.6 or 3.7 of premake. Once you have premake extract the '''premake.exe''' file into the said folder.&lt;br /&gt;
&lt;br /&gt;
* 4. Open '''config.lua''' in the premake folder and edit the Ogre and OIS paths accordingly, so that they will point to the dependency files. In my case for example the 2 lines look like this (having the OGRE and CEGUI main folders on the same level):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OGRE_PATHS = { &amp;quot;../OGRE&amp;quot;, &amp;quot;include/OGRE&amp;quot;, &amp;quot;lib&amp;quot; }&lt;br /&gt;
OIS_PATHS = { &amp;quot;../OGRE&amp;quot;, &amp;quot;include/OIS&amp;quot;, &amp;quot;lib&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Remember to use forward slashes here! Just copying the paths from the Windows explorer will give you backward slashes. Replace them!&lt;br /&gt;
&lt;br /&gt;
Next, set all Renderers you do not need to &amp;quot;false&amp;quot;, in this case we will only need ''OGRE_RENDERER''. You can also set all samples to false, except maybe ''SAMPLES_OGRE'' if you want to compile those.&lt;br /&gt;
&lt;br /&gt;
'''Important:''' Since Ogre 1.7 the &amp;quot;boost&amp;quot; library is a new dependency of OGRE. If you are unsure if your Ogre version needs boost, you might want to check if there is a boost folder in your Ogre main folder. In case your Ogre version makes use of boost, you will additionally add boost to the extra paths of CEGUIOgreRenderer, in my case it looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CEGUI_EXTRA_PATHS = { &lt;br /&gt;
{ &amp;quot;../OGRE/boost_1_42&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;lib&amp;quot;, &amp;quot;CEGUIOgreRenderer&amp;quot; }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 5. Next, we create our Visual Studio Projects - Execute '''build_vs2008.bat''' to create a Visual Studio 2008 project or execute any other .bat file for your respective compiler version.&lt;br /&gt;
&lt;br /&gt;
* 6. This should create '''CEGUI.sln''' in the premake folder. Open it.&lt;br /&gt;
&lt;br /&gt;
* 7. If you have the Ogre lib files seperated into a Debug and Release folder, you will have to change the path in the '''Linker''' settings of the project so they will point to the '''lib/Debug''' or '''lib/Release''' folder for each configuration respectively.&lt;br /&gt;
&lt;br /&gt;
* 8. '''Build''' the '''CEGUIOgreRenderer''' in Debug and Release mode.&lt;br /&gt;
* 9. Now that you have built the .dll files and .lib files for CEGUI by yourself, you only have to change the linker settings of your project so that the needed .lib files and their folder paths are included there. Also you might want to include the dll's into a folder where your executable application will find them (for example just the folder your executable starts from). Finally remember to set the CEGUI '''include''' directory (for example &amp;quot;..\..\CEGUI\cegui\include\cegui&amp;quot;) inside your C++ project settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Steps for GNU and Unix-like environments ==&lt;br /&gt;
===CEGUI 0.8.x ===&lt;br /&gt;
&lt;br /&gt;
Going to the extracted CEGUI source directory and running the following commands seems to work. It also seems that the configurations are not used anymore. (noobnote: don't include the dollar-signs at the start of the lines. They represent the prompt.):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir build &amp;amp;&amp;amp; cd build&lt;br /&gt;
&lt;br /&gt;
$ export NUMBER_OF_CORES=`cat /proc/cpuinfo | grep &amp;quot;cpu cores&amp;quot; | uniq | awk '{print $4}'`&lt;br /&gt;
&lt;br /&gt;
$ cmake -D CMAKE_BUILD_TYPE=Release ..&lt;br /&gt;
&lt;br /&gt;
$ make -j$NUMBER_OF_CORES&lt;br /&gt;
&lt;br /&gt;
$ sudo make install&lt;br /&gt;
&lt;br /&gt;
$ sudo ldconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If everything worked out, you now have CEGUI up and running!&lt;br /&gt;
&lt;br /&gt;
===CEGUI 0.7.x ===&lt;br /&gt;
Going to the extracted CEGUI source directory and running the following commands seems to work (noobnote: don't include the dollar-signs at the start of the lines. They represent the prompt.):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./bootstrap &amp;amp;&amp;amp; mkdir build &amp;amp;&amp;amp; cd build&lt;br /&gt;
&lt;br /&gt;
$ export NUMBER_OF_CORES=`cat /proc/cpuinfo | grep &amp;quot;cpu cores&amp;quot; | uniq | awk '{print $4}'`&lt;br /&gt;
&lt;br /&gt;
$ ../configure &amp;amp;&amp;amp; make -j$NUMBER_OF_CORES&lt;br /&gt;
&lt;br /&gt;
$ sudo make install&lt;br /&gt;
&lt;br /&gt;
$ sudo ldconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If everything worked out, you now have CEGUI up and running!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
*CEGUI Exception - bad allocation&lt;br /&gt;
This error is rather cryptic in its meaning and can occur when linking debug libraries to release libraries or vice-versa. Simply check all CMAKE paths to see if you accidently mixed up the debug and release paths for libraries (OIS, Ogre). If you did not then this might be due to a now-fixed error in 0.8.3. If this is the case you will have to change the .lib file to the OgreMain_d.lib version in Debug mode. Otherwise delete the cache (see mention above) and restart the CMake configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Questions==&lt;br /&gt;
Feel free to edit this page using your CEGUI forum account login if you want to append something. If you have questions you can ask in the CEGUI forum or join our IRC channel #cegui on irc.freenode.net - &lt;br /&gt;
In case you need help building Ogre in general, I'd recommend reading for example [http://blog.tidalware.com/2009/08/building-ogre-with-visual-studio/ this short guide (might be outdated though)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the Ogre-wiki version of this article you can also check this link: http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Building+CEGUI&lt;br /&gt;
&lt;br /&gt;
[[Category:HowTo]]&lt;/div&gt;</summary>
		<author><name>Underworldguardian</name></author>	</entry>

	</feed>