All steps for building SFML 2.0 using Cmake and using it staticly on Windows-Visual Studio 10 Express (atleast, this is how I did it)
- Download latest zip archive SFML2 and extract
- Open Visual studio command prompt as administrator (by right clicking and select 'Run as administrator'
- Open Cmake-gui in this command prompt by entering 'cmake-gui', set source code folder to the extracted zip archive, destination folder to whatever you like.
- Press the configure button
- Specify generator: "NMake Makefiles" (using default native compilers)
- BUILD_DOC to FALSE
- BUILD_EXAMPLES to FALSE
- BUILD_SHARED_LIBS to FALSE
- GLEW_INCLUDE_PATH to "[zip-archive]/extlibs/headers"
- GLEW_LIBRARY to "[zip-archive]/extlibs/libs-msvc/x86/glew.lib"
- STATIC_STD_LIBS to FALSE
- CMAKE_BUILD_TYPE to Release
- CMAKE_INSTALL_PREFIX to "C:/Program Files (x86)/SFML" (or whatever you want it installed in)
- Press configure again
- Press generate
- Switch to the VS command prompt, locate the destination folder and type 'nmake install'
- Change 'Release' to 'Debug' in Cmake, press configure again and press generate.
- Type 'nmake install' again in the command prompt.
- Exit cmake and command prompt, check to see if the sfml-xxx-s-d.lib and sfml-xxx-s.lib files are created.
- Open a new SFML project, define SFML_STATIC in the preprocessor and link to the correct libraries.
If it still doesn't work, something is wrong