TankOs/SFGUI — Issue #122: CMake & static SFML libraries
Author: eXpl0it3r
Created: 2012-01-14 00:47:13+00:00
State: open

I tried to generate project files for VS 2010 with CMake an run into some errors.

First CMake complains from the SFML_find package that it can't find the SFML libraries, but that is because it's only looking for the non static ones, like sfml-graphics.lib, sfml-system.lib and sfml-window.lib and ignores the ones with -s.lib.
The error is displayed as following:

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindSFML.cmake:164 (message):
Could NOT find SFML (missing: SFML_GRAPHICS_LIBRARY SFML_WINDOW_LIBRARY
SFML_SYSTEM_LIBRARY)
Call Stack (most recent call first):
CMakeLists.txt:9 (find_package)
Configuring incomplete, errors occurred!

Creating some fake files with the wanted names will let CMakes generation process pass. After it passes it shows the option to choose SFML static but generates anyway falsely project files. They still tell the linker to get the non static librarie files and one has to go through all of the 12 projects settings and add an addtional '-s' to all three entries.

Two things to fix here:
1. CMake should not force the user to have the non static libraries.
2. CMake should generate project files with the static libraries.