Reapply SDL2 modifications
The prevents Windows builds from leaking SDL2's exports
This commit is contained in:
parent
ff61c099df
commit
b56a49a1d5
2 changed files with 3 additions and 0 deletions
1
external/SDL2/CMakeLists.txt
vendored
1
external/SDL2/CMakeLists.txt
vendored
|
@ -1843,6 +1843,7 @@ endif()
|
||||||
if(SDL_STATIC)
|
if(SDL_STATIC)
|
||||||
set (BUILD_SHARED_LIBS FALSE)
|
set (BUILD_SHARED_LIBS FALSE)
|
||||||
add_library(SDL2-static STATIC ${SOURCE_FILES})
|
add_library(SDL2-static STATIC ${SOURCE_FILES})
|
||||||
|
target_compile_definitions(SDL2-static PRIVATE SDL_STATIC)
|
||||||
if (NOT SDL_SHARED OR NOT WIN32)
|
if (NOT SDL_SHARED OR NOT WIN32)
|
||||||
set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
|
set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
|
||||||
# Note: Apparently, OUTPUT_NAME must really be unique; even when
|
# Note: Apparently, OUTPUT_NAME must really be unique; even when
|
||||||
|
|
2
external/SDL2/include/begin_code.h
vendored
2
external/SDL2/include/begin_code.h
vendored
|
@ -58,6 +58,8 @@
|
||||||
# else
|
# else
|
||||||
# define DECLSPEC __declspec(dllimport)
|
# define DECLSPEC __declspec(dllimport)
|
||||||
# endif
|
# endif
|
||||||
|
# elif defined(SDL_STATIC)
|
||||||
|
# define DECLSPEC
|
||||||
# else
|
# else
|
||||||
# define DECLSPEC __declspec(dllexport)
|
# define DECLSPEC __declspec(dllexport)
|
||||||
# endif
|
# endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue