vcpkg/ports/sdl2/0003-sdl2-fix-uwp-build.patch

26 lines
754 B
Diff
Raw Normal View History

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1395,8 +1395,13 @@
endif()
endif()
+ if(WINDOWS_STORE)
+ file(GLOB WINRT_MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/winrt/*.cpp)
+ set(SOURCE_FILES ${SOURCE_FILES} ${WINRT_MISC_SOURCES})
+ else()
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/windows/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
+ endif()
set(HAVE_SDL_MISC TRUE)
# Check for DirectX
@@ -1522,7 +1522,7 @@
set(HAVE_SDL_THREADS TRUE)
endif()
- if(SDL_SENSOR AND HAVE_SENSORSAPI_H)
+ if(SDL_SENSOR AND HAVE_SENSORSAPI_H AND NOT WINDOWS_STORE)
set(SDL_SENSOR_WINDOWS 1)
set(HAVE_SDL_SENSORS TRUE)
file(GLOB WINDOWS_SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/windows/*.c)