Hello there,
I've been reading the SFML Game Development Book, which is great by the way; just finished chapter 6.
I'm typing all the code by myself using Sublime Text because I learn more this way instead of only copying/reading the source from GitHub (but I was also able to build that code using CMake).
Thus, I am building the chapters I've rewrote using a simple Makefile.
But the number of files are increasing, and chapter 7 looks like a tough one
I have little experience with Makefiles and I would like to use CMake to build my projects.
I've found this tutorial
https://github.com/SFML/SFML/wiki/Tutorial%3A-Build-your-SFML-project-with-CMake, but I didn't fully understand it.
SFML is installed in a custom path (/home/myusername/development/SFML-2.1).
My projects have 3 directories: ./Include (for .hpp's), ./Source (for .cpp's) and ./Media (for resources).
I include headers in my projects using #include <headerFile.hpp>, and in the Makefiles I use the arg -I./Include for compiling. (Note: I am not using the ./Include/Book directory, only ./Include).
I've created a directory /usr/share/cmake-2.8/Modules/FindSFML and pasted the FindSFML.cmake there.
I've also created the config.h.in and COPYING files in the ./Source directory of my project, and added the #include "config.h" in the Main.cpp.
When i try to use CMake-GUI, i get the following error:
"[...]By not providing "FindSFML.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "SFML", but
CMake did not find one.
[...]"
I am aware that I need to inform CMake where is the FindSFML directory I've created, but I don't know how :/
I also need help adapting the tutorial to my project structure, like informing the compiler about my ./Include and ./Source dirs.
Thanks for the assistance, any help and hints are appreciated.
-Gabriel