Windows (MSVC2013) move to SDL2
authorMartijn Berger <martijn.berger@gmail.com>
Thu, 13 Nov 2014 15:19:57 +0000 (16:19 +0100)
committerMartijn Berger <martijn.berger@gmail.com>
Thu, 13 Nov 2014 15:23:27 +0000 (16:23 +0100)
CMakeLists.txt
SConstruct
build_files/scons/config/win32-vc-config.py
build_files/scons/config/win64-vc-config.py
source/creator/CMakeLists.txt
source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp

index 25182ef6e888e75a3ccb960830b81e1effb9def2..6fe8902234253b9bc3623d92d1ab3c529635534a 100644 (file)
@@ -1675,7 +1675,7 @@ elseif(WIN32)
        if(WITH_SDL)
                set(SDL ${LIBDIR}/sdl)
                set(SDL_INCLUDE_DIR ${SDL}/include)
-               set(SDL_LIBRARY SDL)
+               set(SDL_LIBRARY SDL2)
                set(SDL_LIBPATH ${SDL}/lib)
        endif()
 
index 37c8fa42f10b76f7f7e09984d4154f1983863c86..599ea9b312fe028aab5e05fd28c76d16688d3294 100644 (file)
@@ -1180,7 +1180,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
         dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
 
     if env['WITH_BF_SDL']:
-        dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
+        dllsources.append('${BF_SDL_LIBPATH}/SDL2.dll')
 
     if env['WITH_BF_PYTHON']:
         if env['BF_DEBUG']:
index 6dd853b7da4e2ef85eaa335088ea0e8da88c1d83..48a40cf6719b07d38b1e55c873f7c20e4281bb89 100644 (file)
@@ -57,7 +57,7 @@ BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
 WITH_BF_SDL = True
 BF_SDL = LIBDIR + '/sdl'
 BF_SDL_INC = '${BF_SDL}/include'
-BF_SDL_LIB = 'SDL.lib'
+BF_SDL_LIB = 'SDL2.lib'
 BF_SDL_LIBPATH = '${BF_SDL}/lib'
 
 BF_PTHREADS = LIBDIR + '/pthreads'
index f928f166ba7e28df92458fdb693f50a58b9e8b4f..285e9ac98671a2d705d6bb82848883bcc5bcf55d 100644 (file)
@@ -52,7 +52,7 @@ BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
 WITH_BF_SDL = True
 BF_SDL = LIBDIR + '/sdl'
 BF_SDL_INC = '${BF_SDL}/include'
-BF_SDL_LIB = 'SDL.lib'
+BF_SDL_LIB = 'SDL2.lib'
 BF_SDL_LIBPATH = '${BF_SDL}/lib'
 
 WITH_BF_JACK = False
index 181571bda77c5ae31a9aae4dc131c139e9c6eb64..4cbfe9a7e007315d61aff6e2fc44c2f3d17e4d5f 100644 (file)
@@ -747,7 +747,7 @@ elseif(WIN32)
 
        if(WITH_SDL)
                install(
-                       FILES ${LIBDIR}/sdl/lib/SDL.dll
+                       FILES ${LIBDIR}/sdl/lib/SDL2.dll
                        DESTINATION "."
                )
        endif()
index 2911b3b1a1405185e6e9b8639904261063377e57..38baeaab35ed62bb1f91fda8f3d1bb642249cb2c 100644 (file)
@@ -36,6 +36,9 @@
 #include "SCA_Joystick.h"
 #include "SCA_JoystickPrivate.h"
 
+#ifdef _MSC_VER
+#  include <cstdio> /* printf */
+#endif
 
 #ifdef WITH_SDL
 void SCA_Joystick::OnAxisMotion(SDL_Event* sdl_event)