SFML community forums

Bindings - other languages => C => Topic started by: HKei on April 28, 2012, 11:34:23 pm

Title: cmake SFML_DIR-NOTFOUND?
Post by: HKei on April 28, 2012, 11:34:23 pm
I do have SFML installed in /usr/local/, I have the source somewhere in my home directory. Yet in cmake-gui it keeps complaining (I assume that's the error). It says

Quote
    SFMLConfig.cmake
    sfml-config.cmake



Configuring incomplete, errors occurred!

In the output thingy. I don't know if that means it's looking for SFMLConfig.cmake and not finding it, or having troubles with something within those files. I'm really no good with cmake, can anyone tell me what's wrong (or how I could find out)?
Title: Re: cmake SFML_DIR-NOTFOUND?
Post by: Laurent on April 28, 2012, 11:50:23 pm
CMake cannot find the FindSFML.cmake file, which would help it to find the SFML headers and libraries. This file is not reachable by CMake by default, you must either copy it to the /usr/shared/cmake-2.8/Modules folder (standard location for FindXxx.cmake files), or put the path to the FindSFML.cmake file in the CMAKE_MODULE_PATH variable when you configure your project, so that CMake can find it.

The FindSFML.cmake file is in the /cmake/Modules sub-directory of SFML (or in <install-dir>/share/SFML/cmake/Modules if you installed SFML).
Title: Re: cmake SFML_DIR-NOTFOUND?
Post by: HKei on April 29, 2012, 12:15:56 am
I don't actually have a CMAKE_MODULE_PATH variable (and adding it doesn't do anything), but copying the .cmake did the trick. Thanks!
Title: Re: cmake SFML_DIR-NOTFOUND?
Post by: Nexus on April 29, 2012, 10:29:34 am
I don't actually have a CMAKE_MODULE_PATH variable
You have to check the "Advanced" box in cmake-gui.
Title: Re: cmake SFML_DIR-NOTFOUND?
Post by: HKei on April 29, 2012, 12:24:34 pm
Did that. It wasn't there.
Title: Re: cmake SFML_DIR-NOTFOUND?
Post by: Sonkun on June 04, 2012, 10:29:03 pm
I had the same problem.

SFML installs this file by default in /usr/shared/SFML, is it its right location ?
Title: Re: cmake SFML_DIR-NOTFOUND?
Post by: Sonkun on June 10, 2012, 11:02:18 am
I tried twice and put the right path in CMAKE_MODULE_PATH or SFML_DIR variable does not work. Only copying the file in the standard location for FindXxx.cmake files works.

By default, SFML installs FindSFML.cmake in <install-dir>/share/SFML/cmake/Modules/, why ?
Title: Re: cmake SFML_DIR-NOTFOUND?
Post by: Laurent on June 10, 2012, 12:13:19 pm
Quote
By default, SFML installs FindSFML.cmake in <install-dir>/share/SFML/cmake/Modules/, why ?
It doesn't install this file anymore.