Next select your compiler.
Just keep the “Use default native compilers” option checked and ignore the other three options.
It is possible that CMake will not be able to find sfml and will give you an error.
You will then have to tell CMake where it needs to search for sfml. Change the SFML_ROOT to the correct path. This will be the root path of sfml, which contains the include and lib folders.
When you compiled sfml yourself then you will have to watch out for two things:
Now you can also change the other options. At the end of this CMake part, you can find the explanation of some of the options. Once you are done, you need to press Configure again.
After you pressed configure, you should have reached the message “Configuring done” at the bottom.
All you have to do now is press Generate.
Some last notes about CMake:
You are not done yet.
CMake made a CodeBlocks project in the build directory that has to be build first.
Simply open the “tgui.cbp” file and then hit “Build”.
When this is done you should find the tgui(-d).lib and tgui(-d).dll inside the lib folder.
If you chose to build statically then you will of course only find a tgui-s(-d).lib file.
Open the “Project build options” and choose whether you want to change debug or release target settings. Or you can just click on the name of your project (here TGUI_Test) and set them for both.
In the “Search directories” of the “Compiler” add the path to tgui.
In the “Search directories” of the “Linker” add the path to the tgui libraries.
In ‘Release’ settings, add ‘-ltgui’ to the “Linker settings” under “Other linker options”.
In ‘Debug’ settings, add ‘-ltgui-d’ to the “Linker settings” under “Other linker options”.
When linking statically, you have to use ‘-ltgui-s’ and ‘-ltgui-s-d’ of course.
The order of linking has to be correct: first tgui, then the libraries from sfml, namely graphics, windows and system.
You must also enable c++11.
If you have an older compiler version and don’t have the “-std=c++11″ option, then use “-std=c++0x” instead.
When using shared libraries, don't forget to copy tgui.dll to your project’s folder.
You should now be able to use TGUI.