Sam Lantinga [Thu, 12 Oct 2017 08:47:02 -0700] rev 11606
Fixed bug 3866 - CMake error when trying to make the 'uninstall' target when it already exists
Steve Robinson
In my project, the 'uninstall' target is already created by the glew library. I get this error when SDL2 tries to create it:
CMake Error at _build/3rdparty/SDL2/SDL2-2.0.6/CMakeLists.txt:1816 (add_custom_target):
add_custom_target cannot create target "uninstall" because another target
with the same name already exists. The existing target is a custom target
created in source directory
"D:/Code/sdl2-tutorial/_build/3rdparty/glew/glew-2.1.0/build/cmake". See
documentation for policy CMP0002 for more details.
To fix it, go to the bottom of the SDL2 CMakeLists.txt file. Add an if statement to check for the existence of the target before creating it. The end result looks like this:
if(NOT TARGET uninstall)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()
This is how the glew library deals with this possibility in their CMakeLists.txt file.
Sam Lantinga [Thu, 12 Oct 2017 08:44:45 -0700] rev 11605
Fixed bug 3867 - Can't find install_manifest.txt when running 'uninstall' target
Steve Robinson
When I try to build the 'uninstall' target in CMake when SDL2 is added to a subdirectory of my project, I get this error:
1>CMake Error at cmake_uninstall.cmake:2 (message):
1> Cannot find install manifest:
1> "D:/Code/sdl2-tutorial/_build/3rdparty/SDL2/SDL2-2.0.6/install_manifest.txt"
The install_manifest.txt is actually in the top-level binary directory, not the project-specific binary directory.
To fix it, change all instances of:
CMAKE_CURRENT_BINARY_DIR
To:
CMAKE_BINARY_DIR
In:
cmake_uninstall.cmake.in
Sam Lantinga [Thu, 12 Oct 2017 08:41:11 -0700] rev 11604
Fixed bug 3874 - Compiler warnings SDL_Surface.c and SDL_cocoakeyboard.m
Sam Lantinga [Thu, 12 Oct 2017 08:37:55 -0700] rev 11603
Normalize touch events to the render viewport (thanks Sylvain!)
Sam Lantinga [Thu, 12 Oct 2017 08:27:22 -0700] rev 11602
Fixed divide by zero with a 1x1 sized window
Ozkan Sezer [Thu, 12 Oct 2017 14:28:05 +0300] rev 11601
make sure that SDL_malloc(0) or SDL_calloc(0,x) doesn't return NULL.
Sam Lantinga [Thu, 12 Oct 2017 08:08:04 -0700] rev 11600
Updated version to 2.0.7
Ethan Lee [Tue, 10 Oct 2017 20:22:15 -0400] rev 11599
Check SDL_UDEV_DYNAMIC first, then SDL_UDEV_LIBS separately
Sam Lantinga [Wed, 11 Oct 2017 13:31:21 -0700] rev 11598
Fixed bug 3871 - Touch events are not normalised on X11
Trent Gamblin
The documentation for SDL_TouchFingerEvent says that the x and y coordinates are normalised between 0-1. I've found that to be true on Windows, Android and iOS but on X11 they are in pixel coordinates. This patch fixes the issue. This was the cleanest way I could do it with what was available without changing things around a lot but you may know a better way.
Sam Lantinga [Wed, 11 Oct 2017 13:26:58 -0700] rev 11597
Fixed size in realloc