I'm on Ubuntu 11.04, g++ 4.7.2.
SFML 1.6 came with an installation script, which put it in /usr/local/sfml. I have a cmake configuration file called FindSFML.cmake I got from
here. I've been using that in my projects that use cmake to generate their makefiles to find sfml. It did succesfully find my 1.6 installation when I wanted it to for my older projects.
I now have a project that uses sfml 2, and I have downloaded compiled binaries from the Downloads section of the main site. I put them in the main project directory, and tried the command stated above in a build directory to generate makefiles. AFAIK, setting SFMLDIR should make the script search for sfml in the directory specified. It didn't, since I got this error:
SFML found but version too low (requested: 2, found: 1.x)
The variable is SFML_ROOT (read the doc!).
Still doesn't work.
Oops... It seems that I have an outdated version. SFMLDIR has been replaced with SFML_ROOT. Will edit this post after I tried it out.
EDIT: Still doesn't work. I don't get why setting SFML_ROOT doesn't change where it searches. I have tried both ways: exporting SFML_ROOT to point to the SFML 2.0 directory, and defining it as a cmake variable.
EDIT2: What directory should it actually point at? It currently points to the directory where the include and lib folders are.