Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: cmake SFML_DIR-NOTFOUND?  (Read 8870 times)

0 Members and 1 Guest are viewing this topic.

HKei

  • Newbie
  • *
  • Posts: 23
    • View Profile
cmake SFML_DIR-NOTFOUND?
« 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)?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: cmake SFML_DIR-NOTFOUND?
« Reply #1 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).
Laurent Gomila - SFML developer

HKei

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: cmake SFML_DIR-NOTFOUND?
« Reply #2 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!

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: cmake SFML_DIR-NOTFOUND?
« Reply #3 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.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

HKei

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: cmake SFML_DIR-NOTFOUND?
« Reply #4 on: April 29, 2012, 12:24:34 pm »
Did that. It wasn't there.

Sonkun

  • Full Member
  • ***
  • Posts: 241
    • View Profile
Re: cmake SFML_DIR-NOTFOUND?
« Reply #5 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 ?
« Last Edit: June 06, 2012, 05:36:16 am by Sonkun »
Interested in using SFML with Python ? Try out its Python binding!

Sonkun

  • Full Member
  • ***
  • Posts: 241
    • View Profile
Re: cmake SFML_DIR-NOTFOUND?
« Reply #6 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 ?
Interested in using SFML with Python ? Try out its Python binding!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: cmake SFML_DIR-NOTFOUND?
« Reply #7 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.
Laurent Gomila - SFML developer