Updated SDL2 to the 2.0.4 release version
@@ -169,6 +169,13 @@ if(MSVC)
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Make sure /RTC1 is disabled, otherwise it will use functions from the CRT
|
||||
foreach(flag_var
|
||||
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||
string(REGEX REPLACE "/RTC(su|[1su])" "" ${flag_var} "${${flag_var}}")
|
||||
endforeach(flag_var)
|
||||
endif()
|
||||
|
||||
# Those are used for pkg-config and friends, so that the SDL2.pc, sdl2-config,
|
||||
@@ -382,7 +389,7 @@ if(USE_GCC OR USE_CLANG)
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS "-Wl,--no-undefined")
|
||||
check_c_compiler_flag("" HAVE_NO_UNDEFINED)
|
||||
set(CMAKE_REQUIRED_FLAGS)
|
||||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||
if(HAVE_NO_UNDEFINED)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,--no-undefined")
|
||||
endif()
|
||||
@@ -688,6 +695,52 @@ if(SDL_VIDEO)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
file(GLOB ANDROID_CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_CORE_SOURCES})
|
||||
file(GLOB ANDROID_MAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_MAIN_SOURCES})
|
||||
if(SDL_AUDIO)
|
||||
set(SDL_AUDIO_DRIVER_ANDROID 1)
|
||||
file(GLOB ANDROID_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_AUDIO_SOURCES})
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
endif()
|
||||
if(SDL_FILESYSTEM)
|
||||
set(SDL_FILESYSTEM_ANDROID 1)
|
||||
file(GLOB ANDROID_FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_FILESYSTEM_SOURCES})
|
||||
set(HAVE_SDL_FILESYSTEM TRUE)
|
||||
endif()
|
||||
if(SDL_JOYSTICK)
|
||||
set(SDL_JOYSTICK_ANDROID 1)
|
||||
file(GLOB ANDROID_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_JOYSTICK_SOURCES})
|
||||
set(HAVE_SDL_JOYSTICK TRUE)
|
||||
endif()
|
||||
if(SDL_POWER)
|
||||
set(SDL_POWER_ANDROID 1)
|
||||
file(GLOB ANDROID_POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_POWER_SOURCES})
|
||||
set(HAVE_SDL_POWER TRUE)
|
||||
endif()
|
||||
if(SDL_VIDEO)
|
||||
set(SDL_VIDEO_DRIVER_ANDROID 1)
|
||||
file(GLOB ANDROID_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_VIDEO_SOURCES})
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
|
||||
#enable gles
|
||||
if(VIDEO_OPENGLES)
|
||||
set(SDL_VIDEO_OPENGL_EGL 1)
|
||||
set(HAVE_VIDEO_OPENGLES TRUE)
|
||||
set(SDL_VIDEO_OPENGL_ES2 1)
|
||||
set(SDL_VIDEO_RENDER_OGL_ES2 1)
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,--undefined=Java_org_libsdl_app_SDLActivity_nativeInit")
|
||||
endif()
|
||||
|
||||
# Platform-specific options and settings
|
||||
if(EMSCRIPTEN)
|
||||
# Hide noisy warnings that intend to aid mostly during initial stages of porting a new
|
||||
@@ -826,7 +879,7 @@ elseif(UNIX AND NOT APPLE)
|
||||
|
||||
if(SDL_JOYSTICK)
|
||||
CheckUSBHID() # seems to be BSD specific - limit the test to BSD only?
|
||||
if(LINUX)
|
||||
if(LINUX AND NOT ANDROID)
|
||||
set(SDL_JOYSTICK_LINUX 1)
|
||||
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/linux/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
|
||||
@@ -898,9 +951,20 @@ elseif(WINDOWS)
|
||||
file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
|
||||
|
||||
if(MSVC)
|
||||
# Prevent codegen that would use the VC runtime libraries.
|
||||
add_definitions(/GS-)
|
||||
if(NOT ARCH_64)
|
||||
add_definitions(/arch:SSE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Check for DirectX
|
||||
if(DIRECTX)
|
||||
if(NOT CMAKE_COMPILER_IS_MINGW)
|
||||
if(DEFINED MSVC_VERSION AND NOT ${MSVC_VERSION} LESS 1700)
|
||||
set(USE_WINSDK_DIRECTX TRUE)
|
||||
endif()
|
||||
if(NOT CMAKE_COMPILER_IS_MINGW AND NOT USE_WINSDK_DIRECTX)
|
||||
if("$ENV{DXSDK_DIR}" STREQUAL "")
|
||||
message_error("DIRECTX requires the \$DXSDK_DIR environment variable to be set")
|
||||
endif()
|
||||
@@ -926,7 +990,7 @@ elseif(WINDOWS)
|
||||
check_include_file(dxgi.h HAVE_DXGI_H)
|
||||
if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H OR HAVE_XAUDIO2_H)
|
||||
set(HAVE_DIRECTX TRUE)
|
||||
if(NOT CMAKE_COMPILER_IS_MINGW)
|
||||
if(NOT CMAKE_COMPILER_IS_MINGW AND NOT USE_WINSDK_DIRECTX)
|
||||
# TODO: change $ENV{DXSDL_DIR} to get the path from the include checks
|
||||
link_directories($ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH})
|
||||
include_directories($ENV{DXSDK_DIR}\\Include)
|
||||
@@ -1044,7 +1108,7 @@ elseif(WINDOWS)
|
||||
list(APPEND EXTRA_LIBS dinput8 dxguid)
|
||||
if(CMAKE_COMPILER_IS_MINGW)
|
||||
list(APPEND EXTRA_LIBS dxerr8)
|
||||
else()
|
||||
elseif (NOT USE_WINSDK_DIRECTX)
|
||||
list(APPEND EXTRA_LIBS dxerr)
|
||||
endif()
|
||||
endif()
|
||||
@@ -1087,7 +1151,7 @@ elseif(APPLE)
|
||||
|
||||
# Requires the darwin file implementation
|
||||
if(SDL_FILE)
|
||||
file(GLOB EXTRA_SOURCES ${PROJECT_SOURCE_DIR}/src/file/cocoa/*.m)
|
||||
file(GLOB EXTRA_SOURCES ${SDL2_SOURCE_DIR}/src/file/cocoa/*.m)
|
||||
set(SOURCE_FILES ${EXTRA_SOURCES} ${SOURCE_FILES})
|
||||
set_source_files_properties(${EXTRA_SOURCES} PROPERTIES LANGUAGE C)
|
||||
set(HAVE_SDL_FILE TRUE)
|
||||
@@ -1403,8 +1467,14 @@ if(SDL_SHARED)
|
||||
SOVERSION ${LT_REVISION}
|
||||
OUTPUT_NAME "SDL2")
|
||||
endif()
|
||||
set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
|
||||
target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
|
||||
if(MSVC)
|
||||
# Don't try to link with the default set of libraries.
|
||||
set_target_properties(SDL2 PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
|
||||
set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
|
||||
set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
|
||||
endif()
|
||||
set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
|
||||
target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
|
||||
endif()
|
||||
|
||||
if(SDL_STATIC)
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2015 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -12,13 +12,13 @@ CFLAGS = -Wall -fPIC -I./include -I$(WIZSDK)/include -DWIZ_GLES_LITE
|
||||
TARGET_STATIC = libSDL13.a
|
||||
TARGET_SHARED = libSDL13.so
|
||||
|
||||
SOURCES = ./src/*.c ./src/audio/*.c ./src/cdrom/*.c ./src/cpuinfo/*.c ./src/events/*.c \
|
||||
SOURCES = ./src/*.c ./src/audio/*.c ./src/cpuinfo/*.c ./src/events/*.c \
|
||||
./src/file/*.c ./src/stdlib/*.c ./src/thread/*.c ./src/timer/*.c ./src/video/*.c \
|
||||
./src/joystick/*.c ./src/haptic/*.c ./src/video/dummy/*.c ./src/audio/disk/*.c \
|
||||
./src/audio/dummy/*.c ./src/loadso/dlopen/*.c ./src/audio/dsp/*.c \
|
||||
./src/thread/pthread/SDL_systhread.c ./src/thread/pthread/SDL_syssem.c \
|
||||
./src/thread/pthread/SDL_sysmutex.c ./src/thread/pthread/SDL_syscond.c \
|
||||
./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c ./src/cdrom/dummy/*.c \
|
||||
./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c \
|
||||
./src/video/pandora/SDL_pandora.o ./src/video/pandora/SDL_pandora_events.o
|
||||
|
||||
|
||||
@@ -71,13 +71,13 @@ Linux:
|
||||
|
||||
iOS:
|
||||
* Added support for iOS 8
|
||||
* The SDL_WINDOW_ALLOW_HIGHDPI window flag now enables high-dpi support, and SDL_GL_GetDrawableSize() or SDL_GetRendererOutputSize() gets the window resolution in pixels
|
||||
* SDL_GetWindowSize() and display mode sizes are in the "DPI-independent points" / "screen coordinates" coordinate space rather than pixels (matches OS X behavior)
|
||||
* Added native resolution support for the iPhone 6 Plus
|
||||
* Added support for MFi game controllers
|
||||
* Added support for the hint SDL_HINT_ACCELEROMETER_AS_JOYSTICK
|
||||
* Added sRGB OpenGL ES context support on iOS 7+
|
||||
* Added native resolution support for the iPhone 6 Plus
|
||||
* Added support for SDL_DisableScreenSaver(), SDL_EnableScreenSaver() and the hint SDL_HINT_VIDEO_ALLOW_SCREENSAVER
|
||||
* The SDL_WINDOW_ALLOW_HIGHDPI window flag now enables high-dpi support, and SDL_GL_GetDrawableSize() or SDL_GetRendererOutputSize() gets the window resolution in pixels
|
||||
* SDL_GetWindowSize() and display mode sizes are in the "DPI-independent points" coordinate space rather than pixels (matches OS X behavior)
|
||||
* SDL_SysWMinfo now contains the OpenGL ES framebuffer and color renderbuffer objects used by the window's active GLES view
|
||||
* Fixed various rotation and orientation issues
|
||||
* Fixed memory leaks
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 578 B After Width: | Height: | Size: 578 B |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 450 KiB After Width: | Height: | Size: 450 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -1,6 +1,6 @@
|
||||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2015 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |