From 0b8870669539b0fafa77794d5e17caf5e38ac682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Sun, 17 Mar 2024 21:04:06 -0700 Subject: [PATCH] Copy SDL2.dll to bin folder. --- premake5.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/premake5.lua b/premake5.lua index 9f98d470d..6a0de869d 100644 --- a/premake5.lua +++ b/premake5.lua @@ -162,6 +162,14 @@ function download_and_extract_sdl(sdl_url) end end +function copy_sdl() + if _OPTIONS["windows-vc-build"] then + os.copyfile( _MAIN_SCRIPT_DIR .. "/src/thirdparty/" .. remote_sdl2_version .."/lib/x64/SDL2.dll", _MAIN_SCRIPT_DIR .. "/bin/SDL2.dll" ) + elseif _OPTIONS["windows-mingw-build"] then + os.copyfile( _MAIN_SCRIPT_DIR .. "/src/thirdparty/" .. remote_sdl2_version .."/x86_64-w64-mingw32/bin/SDL2.dll", _MAIN_SCRIPT_DIR .. "/bin/SDL2.dll" ) + end +end + function version_to_number( version ) versionpart = 0 versionnum = 0 @@ -182,8 +190,10 @@ function download_and_extract_dependencies() if not os.isdir("src/thirdparty/" .. remote_sdl2_version) then if _OPTIONS["windows-vc-build"] then download_and_extract_sdl(remote_sdl2_devel_vc_url) + copy_sdl() elseif _OPTIONS["windows-mingw-build"] then download_and_extract_sdl(remote_sdl2_devel_mingw_url) + copy_sdl() elseif os.istarget("ios") then download_and_extract_sdl(remote_sdl2_devel_src_url) end