For those who still can't figure out how to use CMake on Windows:
{
SFML root directory} is the directory with the SFML source. (I don't like to install libs all over my system so the source copy is good enough.)
[list=1]
- Run the CMake GUI. (Yes, for those who laugh at GUI users it IS in fact the easier way on Windows.)
- Enter the SFGUI root directory as source code directory and directory in which to build the binaries. (The directory where the SFGUI CMakeLists.txt is.)
- Press Configure and select your preferred build system.
- CMake will then go through the usual probing and stop with a few errors (which are worth reading).
- If you're running the standard installation you won't have a system-wide CMake modules path set.
- Check the Grouped and Advanced boxes next to the Add Entry button.
- Click on Add Entry.
- Type in
Name: CMAKE_MODULE_PATH
Type: PATH
Value: {
SFML root directory}\cmake\Modules (The directory where
FindSFML.cmake is.)
- Press OK and Configure again.
- In the main treeview area expand the SFML category and fill in all entries in that category.
The
SFML_xxx_LIBRARY_yyy-NOTFOUND entries should be the compiled
SFML library files themselves. (Not the directories they are in!)
The
SFML_INCLUDE_DIR-NOTFOUND should be the directory where the
SFML includes can be found: {
SFML root directory}\include
If you compiled SFML with only 1 build type then select the same library file for both debug and release.
You do NOT have to fill in the SFML_DIR entry if the others are present.- Once done with the previous step, press Configure again.
- If you compiled SFML as a static library mark the box for SFML_STATIC under the SFML category.
- If you want to compile SFGUI as a static library mark the box for SFGUI_STATIC under Ungrouped Entries
- You should be able to configure and generate a project configuration / Makefile now. If CMake complains about missing Boost continue to step 15.
- Under the Boost category set the Boost_INCLUDE_DIR entry to the directory where the Boost include directory is located.
(The directory where you find the boost directory in which all the boost headers can be found.)
- Press configure. Check your settings one last time and press Generate when you're satisfied.
- Have fun with SFGUI.[/list:o]
Hopefully I was able to help someone with this list. If not then.. oh well..
If anybody is going to say this isn't the best/right/whatever way to do it, I am fully aware of that. This is how I got it to work for me on this wonderful operating system. Don't fix that which ain't broken (or a hack that actually works).