Fix sdl2 build if there is space in the path (#8760)

* Fix sdl2 build if there is space in the path

* [sdl2] Bump control version to account for new patch
This commit is contained in:
Krisztián Csordás 2019-10-28 19:13:09 +01:00 committed by Robert Schumacher
parent 203c3e798a
commit 903ca87652
3 changed files with 26 additions and 1 deletions

View File

@ -1,5 +1,5 @@
Source: sdl2
Version: 2.0.10-1
Version: 2.0.10-2
Homepage: https://github.com/SDL-Mirror/SDL
Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.

View File

@ -0,0 +1,24 @@
diff -ur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2019-07-23 21:41:00.000000000 +0200
+++ b/CMakeLists.txt 2019-10-27 20:26:38.000000000 +0100
@@ -257,7 +257,7 @@
# General includes
include_directories(${SDL2_BINARY_DIR}/include ${SDL2_SOURCE_DIR}/include)
if(USE_GCC OR USE_CLANG)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -idirafter ${SDL2_SOURCE_DIR}/src/video/khronos")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -idirafter \"${SDL2_SOURCE_DIR}/src/video/khronos\"")
else()
include_directories(${SDL2_SOURCE_DIR}/src/video/khronos)
endif()
diff -ur a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
--- a/cmake/sdlchecks.cmake 2019-07-23 21:41:00.000000000 +0200
+++ b/cmake/sdlchecks.cmake 2019-10-27 20:27:10.000000000 +0100
@@ -1086,7 +1086,7 @@
set(HAVE_SDL_JOYSTICK TRUE)
file(GLOB HIDAPI_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${HIDAPI_SOURCES})
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS} -I${SDL2_SOURCE_DIR}/src/hidapi/hidapi")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS} \"-I${SDL2_SOURCE_DIR}/src/hidapi/hidapi\"")
if(NOT HIDAPI_SKIP_LIBUSB)
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/libusb/hid.c)
list(APPEND EXTRA_LIBS ${LIBUSB_LIBS})

View File

@ -11,6 +11,7 @@ vcpkg_from_github(
enable-winrt-cmake.patch
fix-arm64-headers.patch
disable-hidapi-for-uwp.patch
fix-space-in-path.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC)