mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-25 14:20:32 +00:00
[magnum] Patch SDL2 includes, msbuild compatibility
Concerning SDL2 includes and how do they work. It is seems what the common practice is to append 'SDL2' include path to the compiler options and then do plain #include "SDL.h". While it works in cmake based projects it won't pass in msbuild ones. This patch changes #include to 'global' style <SDL2/SDL.h> and solves the problem.
This commit is contained in:
parent
27db5c14bb
commit
61dbead6fc
20
ports/magnum/001-sdl-includes.patch
Normal file
20
ports/magnum/001-sdl-includes.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h
|
||||||
|
index 99c3174..311b2c1 100644
|
||||||
|
--- a/src/Magnum/Platform/Sdl2Application.h
|
||||||
|
+++ b/src/Magnum/Platform/Sdl2Application.h
|
||||||
|
@@ -42,11 +42,11 @@
|
||||||
|
#ifdef CORRADE_TARGET_WINDOWS /* Windows version of SDL2 redefines main(), we don't want that */
|
||||||
|
#define SDL_MAIN_HANDLED
|
||||||
|
#endif
|
||||||
|
-#include <SDL.h>
|
||||||
|
-#include <SDL_scancode.h>
|
||||||
|
+#include <SDL2/SDL.h>
|
||||||
|
+#include <SDL2/SDL_scancode.h>
|
||||||
|
|
||||||
|
#ifdef CORRADE_TARGET_WINDOWS_RT
|
||||||
|
-#include <SDL_main.h> /* For SDL_WinRTRunApp */
|
||||||
|
+#include <SDL2/SDL_main.h> /* For SDL_WinRTRunApp */
|
||||||
|
#include <wrl.h> /* For the WinMain entrypoint */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
Source: magnum
|
Source: magnum
|
||||||
Version: jun2017-1
|
Version: jun2017-2
|
||||||
Build-Depends: corrade, sdl2, openal-soft
|
Build-Depends: corrade, sdl2, openal-soft
|
||||||
Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php
|
Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php
|
||||||
|
@ -7,6 +7,11 @@ vcpkg_from_github(
|
|||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
)
|
)
|
||||||
|
|
||||||
|
vcpkg_apply_patches(
|
||||||
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
|
PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch
|
||||||
|
)
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||||
set(BUILD_STATIC 1)
|
set(BUILD_STATIC 1)
|
||||||
else()
|
else()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user