Fix file hash and show download filename
function(fetch_sdl2_library directory url filename hash)
if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/${filename})
- message(STATUS "Downloading ${url}")
+ message(STATUS "Downloading ${filename}")
file(DOWNLOAD ${url}${filename} ${CMAKE_CURRENT_LIST_DIR}/${filename}
SHOW_PROGRESS
TIMEOUT 120
@@ -12,13 +12,13 @@ function(fetch_sdl2_library directory url filename hash)
# tar -xf should work on Windows 10 build 17063 or later (Dec 2017)
execute_process(COMMAND tar -xf ${filename}
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
+ endif()
# in future we might be able to use:
# file(ARCHIVE_EXTRACT INPUT ${filename})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/${directory}/include
DESTINATION ${CMAKE_CURRENT_LIST_DIR}/)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/${directory}/lib
DESTINATION ${CMAKE_CURRENT_LIST_DIR}/)
- endif()
endfunction(fetch_sdl2_library)
@@ -28,7 +28,7 @@ if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/include)
SDL2-2.0.12
https://www.libsdl.org/release/
SDL2-devel-2.0.12-VC.zip
- bd40f726fbcb1430709eaa671ec6f6b5b36e2e4a
+ 6839b6ec345ef754a6585ab24f04e125e88c3392
)
fetch_sdl2_library(
