1
C / Building CSFML 2.0 on Windows
« on: November 04, 2012, 02:35:22 pm »
Nevermind, see: Laurent's post below
(The instructions below are for the latest SFML and CSFML source from github as of the time of writing)
Figuring out how to get CSFML 2.0 to build on Windows took me a while so to save others some time here's what you need to:
After building SFML 2.0 copy cmake/Modules/FindSFML.cmake into the CSFML directory cmake/Modules (you'll need to mkdir Modules).
Open up src/SFML/CMakeLists.txt from the CSFML directory and find the line:
find_package(SFML 2.0 COMPONENTS system window network graphics audio REQUIRED)
Above this line add the following:
set(SFML_ROOT "C:/Program Files (x86)/SFML")
set(SFML_SYSTEM_LIBRARY_RELEASE "${SFML_ROOT}/lib/sfml-system.lib")
set(SFML_WINDOW_LIBRARY_RELEASE "${SFML_ROOT}/lib/sfml-window.lib")
set(SFML_NETWORK_LIBRARY_RELEASE "${SFML_ROOT}/lib/sfml-network.lib")
set(SFML_GRAPHICS_LIBRARY_RELEASE "${SFML_ROOT}/lib/sfml-graphics.lib")
set(SFML_AUDIO_LIBRARY_RELEASE "${SFML_ROOT}/lib/sfml-audio.lib")
set(SFML_SYSTEM_LIBRARY_DEBUG "${SFML_ROOT}/lib/sfml-system-d.lib")
set(SFML_WINDOW_LIBRARY_DEBUG "${SFML_ROOT}/lib/sfml-window-d.lib")
set(SFML_NETWORK_LIBRARY_DEBUG "${SFML_ROOT}/lib/sfml-network-d.lib")
set(SFML_GRAPHICS_LIBRARY_DEBUG "${SFML_ROOT}/lib/sfml-graphics-d.lib")
set(SFML_AUDIO_LIBRARY_DEBUG "${SFML_ROOT}/lib/sfml-audio-d.lib")
(SFML_ROOT should be set to wherever you installed SFML 2.0)
And now cmake should be happy and you can build CSFML, etc.
Figuring out how to get CSFML 2.0 to build on Windows took me a while so to save others some time here's what you need to:
After building SFML 2.0 copy cmake/Modules/FindSFML.cmake into the CSFML directory cmake/Modules (you'll need to mkdir Modules).
Open up src/SFML/CMakeLists.txt from the CSFML directory and find the line:
find_package(SFML 2.0 COMPONENTS system window network graphics audio REQUIRED)
Above this line add the following:
set(SFML_ROOT "C:/Program Files (x86)/SFML")
set(SFML_SYSTEM_LIBRARY_RELEASE "${SFML_ROOT}/lib/sfml-system.lib")
set(SFML_WINDOW_LIBRARY_RELEASE "${SFML_ROOT}/lib/sfml-window.lib")
set(SFML_NETWORK_LIBRARY_RELEASE "${SFML_ROOT}/lib/sfml-network.lib")
set(SFML_GRAPHICS_LIBRARY_RELEASE "${SFML_ROOT}/lib/sfml-graphics.lib")
set(SFML_AUDIO_LIBRARY_RELEASE "${SFML_ROOT}/lib/sfml-audio.lib")
set(SFML_SYSTEM_LIBRARY_DEBUG "${SFML_ROOT}/lib/sfml-system-d.lib")
set(SFML_WINDOW_LIBRARY_DEBUG "${SFML_ROOT}/lib/sfml-window-d.lib")
set(SFML_NETWORK_LIBRARY_DEBUG "${SFML_ROOT}/lib/sfml-network-d.lib")
set(SFML_GRAPHICS_LIBRARY_DEBUG "${SFML_ROOT}/lib/sfml-graphics-d.lib")
set(SFML_AUDIO_LIBRARY_DEBUG "${SFML_ROOT}/lib/sfml-audio-d.lib")
(SFML_ROOT should be set to wherever you installed SFML 2.0)
And now cmake should be happy and you can build CSFML, etc.