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

Author Topic: FindGLEW.cmake  (Read 3384 times)

0 Members and 1 Guest are viewing this topic.

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
FindGLEW.cmake
« on: February 20, 2014, 11:04:23 am »
Hi,

is it please possible to use the original (i.e. the one distributed with CMake) FindGLEW.cmake file? You guys use GLEW_INCLUDE_PATH where as the original one uses GLEW_INCLUDE_DIRS.

When SFML's cmake/Modules path is added to CMAKE_MODULES_PATH, CMake will always favor that  instead of the default one.

Deleting the file from the repository should do the trick.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: FindGLEW.cmake
« Reply #1 on: February 20, 2014, 11:27:53 am »
Sure, if it wasn't added to CMake too recently.
Laurent Gomila - SFML developer

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: FindGLEW.cmake
« Reply #2 on: February 20, 2014, 11:59:49 am »
Another option would be to move all the CMake files, except FindSFML.cmake, to another directory, i.e. extlibs/cmake. That way your custom scripts do not shadow the ones that come with CMake.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: FindGLEW.cmake
« Reply #3 on: February 20, 2014, 12:40:47 pm »
How would that be different from the current situation?
Laurent Gomila - SFML developer

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: FindGLEW.cmake
« Reply #4 on: February 20, 2014, 02:16:46 pm »
The problem is not that SFML internally uses a custom FindGLEW.cmake script, because that's only used while building SFML. The problem is that when you add SFML's cmake/Modules to CMAKE_MODULE_PATH, your GLEW file will take precedence over the system one.

This happened to some SFGUI users, because the easiest and shortest describable way of finding SFML on the system is by adding cmake/Modules to the CMAKE_MODULES_PATH. We have even added this information to our guide but ignored the fact that there are files which do not belong to SFML itself.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: FindGLEW.cmake
« Reply #5 on: February 20, 2014, 02:28:37 pm »
Ok, I see.

If FindGLEW.cmake is part of CMake now, it's better to just remove my own script, unless it is too recent.
Laurent Gomila - SFML developer

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: FindGLEW.cmake
« Reply #6 on: February 20, 2014, 02:31:13 pm »
Quote
it's better to just remove my own script, unless it is too recent.
Yes. What exactly does "too recent" mean? So that SFML is still buildable on Debian and other "not-so-recent" operating systems? That's also why I mentioned the workaround -- which will avoid clashing with possible built-in CMake versions of FindSndFile.cmake, FindGLES.cmake etc. in the future.

 

anything