Skip to content

Commit c7442fc

Browse files
authored
Merge pull request #294 from MoeMod/win32_sdl2_fix
fix win32 sdl2 install
2 parents 6acd44f + 83d2f3e commit c7442fc

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ jobs:
196196
before_script:
197197
- choco install nsis
198198
- rm C:/ProgramData/chocolatey/bin/cpack.exe
199-
- curl http://libsdl.org/release/SDL2-devel-2.0.14-VC.zip -o SDL2.zip
200-
- unzip SDL2.zip
199+
- curl -s http://libsdl.org/release/SDL2-2.0.14.zip > SDL2-2.0.14.zip
200+
- unzip SDL2-2.0.14.zip
201201
- mv SDL2-2.0.14 3rdparty/SDL2
202202
- git clone https://github.com/LuaJIT/LuaJIT 3rdparty/LuaJIT
203203
- git clone https://github.com/Neargye/nameof 3rdparty/nameof
@@ -229,8 +229,8 @@ jobs:
229229
before_script:
230230
- choco install nsis
231231
- rm C:/ProgramData/chocolatey/bin/cpack.exe
232-
- curl http://libsdl.org/release/SDL2-devel-2.0.14-VC.zip -o SDL2.zip
233-
- unzip SDL2.zip
232+
- curl -s http://libsdl.org/release/SDL2-2.0.14.zip > SDL2-2.0.14.zip
233+
- unzip SDL2-2.0.14.zip
234234
- mv SDL2-2.0.14 3rdparty/SDL2
235235
- git clone https://github.com/LuaJIT/LuaJIT 3rdparty/LuaJIT
236236
- git clone https://github.com/Neargye/nameof 3rdparty/nameof

3rdparty/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ if(XASH_SDL)
1919
target_include_directories(sdl2 INTERFACE ${SDL2_INCLUDE_DIR})
2020
if(MSVC)
2121
string(REGEX REPLACE "lib$" "dll" SDL2_DLL "${SDL2_LIBRARY}")
22-
install(FILES ${SDL2_DLL} DESTINATION "." OPTIONAL)
22+
install(FILES ${SDL2_LIBRARY} DESTINATION "." OPTIONAL)
2323
endif()
2424
else()
2525
if(MSVC)
2626
add_definitions(-D_ftol2_sse=SDL_ftol2_sse) # fix x86 compile
2727
endif()
2828
set(DIRECTX OFF CACHE BOOL "" FORCE) # win10 arm dont have dx8
29+
set(LIBC ON CACHE BOOL "" FORCE) # win10 arm dont have dx8
2930
add_subdirectory(SDL2 EXCLUDE_FROM_ALL)
3031
target_link_libraries(sdl2 INTERFACE SDL2-static)
3132
endif()

0 commit comments

Comments
 (0)