OpenDungeons/OpenDungeons — pull request #97 by akien-mageia (2014-08-20 18:43:35+00:00)
Title: Fix definition of the CMAKE_CXX_FLAGS on linux

As discussed in issue #42, the CMake buildsystem is broken on some systems because the project definition does not come at the beginning of the CMakeLists.txt. Because of this, CMake does not know that this is a C++ project and the CMAKE_CXX_COMPILER variable is empty, therefore the --std=c++11 flag is not added properly to the CMAKE_CXX_FLAGS.

@tomluchowski seems to say that moving the project definition to the top broke the his buildsystem, but I would be more inclined to think that something is wrong on his end then. Projects should always be defined at the beginning of the CMakeLists.txt IMHO.

This pull request also adds an insignificant change that makes my life easier to compile OD on Mageia: the FIND_SFML_LIB_SUFFIX is now listed as a CMake argument, and the proper include dir is searched for (Mageia packaged SFML2 so that it can be co-installed with SFML, hence some tricks).