add sdl to dependencies

This commit is contained in:
Sri Sham Haran 2022-09-14 21:47:39 +08:00
parent becce86160
commit 599f1e4ffe
4 changed files with 29 additions and 7 deletions

View File

@ -17,10 +17,11 @@ echo "J - imnodes"
echo "K - tracy" echo "K - tracy"
echo "L - RTTR" echo "L - RTTR"
echo "M - yamlcpp" echo "M - yamlcpp"
echo "O - SDL"
echo --------------------------------------------------- echo ---------------------------------------------------
echo. echo.
choice /C ABCDEFGHIJKLM /T 10 /D A choice /C ABCDEFGHIJKLMNO /T 10 /D A
set _e=%ERRORLEVEL% set _e=%ERRORLEVEL%
if %_e%==1 goto VMA if %_e%==1 goto VMA
@ -36,6 +37,7 @@ if %_e%==10 goto imnodes
if %_e%==11 goto tracy if %_e%==11 goto tracy
if %_e%==12 goto RTTR if %_e%==12 goto RTTR
if %_e%==13 goto yamlcpp if %_e%==13 goto yamlcpp
if %_e%==15 goto SDL
:VMA :VMA
echo -----------------------VMA---------------------------- echo -----------------------VMA----------------------------
@ -107,6 +109,20 @@ if %_e%==12 (goto :done) else (goto :yamlcpp)
echo -----------------------yamlcpp---------------------------- echo -----------------------yamlcpp----------------------------
rmdir "Dependencies/yamlcpp" /S /Q rmdir "Dependencies/yamlcpp" /S /Q
git clone https://github.com/SHADE-DP/yaml-cpp.git "Dependencies/yamlcpp" git clone https://github.com/SHADE-DP/yaml-cpp.git "Dependencies/yamlcpp"
if %_e%==13 (goto :done) else (goto :SDL)
:SDL
echo -----------------------SDL----------------------------
rmdir "Dependencies/SDL" /S /Q
mkdir "Dependencies/SDL/include"
mkdir "Dependencies/SDL/lib"
powershell -Command "& {wget https://github.com/libsdl-org/SDL/releases/download/release-2.24.0/SDL2-devel-2.24.0-VC.zip -OutFile "Dependencies/SDL/SDL.zip"}"
powershell -Command "& {Expand-Archive -LiteralPath Dependencies/SDL/SDL.zip -DestinationPath Dependencies/SDL/tmp}"
robocopy "Dependencies/SDL/tmp/SDL2-2.24.0/lib/x64" "Dependencies/SDL/lib/" /ns /nfl /ndl /nc /njh
robocopy "Dependencies/SDL/tmp/SDL2-2.24.0/include/" "Dependencies/SDL/include/" /ns /nfl /ndl /nc /njh
rmdir "Dependencies/SDL/tmp/" /s /q
del "Dependencies/SDL/SDL.zip"
powershell -Command "& {Remove-Item "Dependencies/SDL/SDL.zip"}"
:done :done
echo DONE! echo DONE!

View File

@ -12,4 +12,5 @@ IncludeDir["yamlcpp"] = "%{wks.location}/Dependencies/yamlcpp/include"
IncludeDir["RTTR"] = "%{wks.location}/Dependencies/RTTR" IncludeDir["RTTR"] = "%{wks.location}/Dependencies/RTTR"
IncludeDir["ktx"] = "%{wks.location}/Dependencies/ktx" IncludeDir["ktx"] = "%{wks.location}/Dependencies/ktx"
IncludeDir["reactphysics3d"] = "%{wks.location}/Dependencies/reactphysics3d" IncludeDir["reactphysics3d"] = "%{wks.location}/Dependencies/reactphysics3d"
IncludeDir["SDL"] = "%{wks.location}/Dependencies/SDL"
IncludeDir["VULKAN"] = "$(VULKAN_SDK)" IncludeDir["VULKAN"] = "$(VULKAN_SDK)"

View File

@ -26,6 +26,7 @@ project "SHADE_Application"
"../SHADE_Engine/src", "../SHADE_Engine/src",
"src", "src",
"%{IncludeDir.dotnet}/include", "%{IncludeDir.dotnet}/include",
"%{IncludeDir.SDL}/include",
} }
flags flags
@ -36,11 +37,14 @@ project "SHADE_Application"
links links
{ {
"SHADE_Engine", "SHADE_Engine",
"SDL2.lib",
"SDL2main.lib"
} }
libdirs libdirs
{ {
"%{IncludeDir.spdlog}/lib", "%{IncludeDir.spdlog}/lib",
"%{IncludeDir.SDL}/lib",
} }
postbuildcommands postbuildcommands

View File

@ -31,7 +31,7 @@ project "SHADE_Engine"
"%{IncludeDir.tracy}", "%{IncludeDir.tracy}",
"%{IncludeDir.VMA}/include", "%{IncludeDir.VMA}/include",
"%{IncludeDir.yamlcpp}", "%{IncludeDir.yamlcpp}",
"%{IncludeDir.ktx}/include", "%{IncludeDir.SDL}/include",
"%{IncludeDir.RTTR}/include", "%{IncludeDir.RTTR}/include",
"%{IncludeDir.reactphysics3d}/include", "%{IncludeDir.reactphysics3d}/include",
"%{IncludeDir.VULKAN}/include", "%{IncludeDir.VULKAN}/include",
@ -45,8 +45,7 @@ project "SHADE_Engine"
"%{IncludeDir.assimp}/lib/Debug", "%{IncludeDir.assimp}/lib/Debug",
"%{IncludeDir.assimp}/lib/Release", "%{IncludeDir.assimp}/lib/Release",
"%{IncludeDir.RTTR}/lib", "%{IncludeDir.RTTR}/lib",
"%{IncludeDir.ktx}/lib/Debug", "%{IncludeDir.SDL}/lib",
"%{IncludeDir.ktx}/lib/Release",
} }
links links
@ -57,7 +56,9 @@ project "SHADE_Engine"
"reactphysics3d", "reactphysics3d",
"imgui", "imgui",
"vulkan-1.lib", "vulkan-1.lib",
"shaderc_shared.lib" "shaderc_shared.lib",
"SDL2.lib",
"SDL2main.lib"
} }
defines defines
@ -93,11 +94,11 @@ project "SHADE_Engine"
filter "configurations:Debug" filter "configurations:Debug"
symbols "On" symbols "On"
defines {"_DEBUG"} defines {"_DEBUG"}
links{"assimp-vc142-mtd.lib", "ktxd.lib", "librttr_core_d.lib"} links{"assimp-vc142-mtd.lib", "librttr_core_d.lib"}
--links{"fmodstudioL_vc.lib", "fmodL_vc.lib"} --links{"fmodstudioL_vc.lib", "fmodL_vc.lib"}
filter "configurations:Release" filter "configurations:Release"
optimize "On" optimize "On"
defines{"_RELEASE"} defines{"_RELEASE"}
links{"assimp-vc142-mt.lib", "ktx.lib", "librttr_core.lib"} links{"assimp-vc142-mt.lib", "librttr_core.lib"}
--links{"fmodstudio_vc.lib", "fmod_vc.lib"} --links{"fmodstudio_vc.lib", "fmod_vc.lib"}