Shader copying now is a pre-build step

Feature/BasicRenderer
Nigel Barink 2022-06-08 21:40:49 +02:00
parent 16b61986a1
commit 82e0f473fb
1 changed files with 25 additions and 21 deletions

View File

@ -32,14 +32,6 @@ project "BarinkEngine"
"../libs/ImGui"
}
links {
"phonon",
"lua54",
"spdlog",
"assimp-vc143-mtd",
"glfw3"
}
files {
"../libs/ImGui/*.cpp",
"../libs/ImGui/backends/imgui_impl_glfw.cpp",
@ -53,17 +45,29 @@ project "BarinkEngine"
}
filter { "system:windows"}
prebuildcommands {
-- Copy shaders
"copy graphics\\shaders\\fragment.shader ..\\build\\SandboxApplication\\Debug\\test.fs",
"copy graphics\\shaders\\vertex.shader ..\\build\\SandboxApplication\\Debug\\test.vs",
"copy graphics\\shaders\\RenderSurfaceFrag.shader ..\\build\\SandboxApplication\\Debug\\RenderSurface.fs",
"copy graphics\\shaders\\RenderSurfaceVert.shader ..\\build\\SandboxApplication\\Debug\\RenderSurface.vs"
}
links {
-- This needs to fall under the filter as the names can differ on different platforms
"phonon",
"lua54",
"spdlog",
"assimp-vc143-mtd",
"glfw3"
}
-- NOTE: make these copy instructions more flexible
ok, err = os.copyfile("graphics/shaders/fragment.shader", "../build/SandboxApplication/Debug/test.fs")
if err then error("Copy fragment shader source failed!") end
ok, err = os.copyfile("graphics/shaders/vertex.shader", "../build/SandboxApplication/Debug/test.vs")
if err then error("Copy vertex shader source failed!") end
ok, err = os.copyfile("graphics/shaders/RenderSurfaceFrag.shader", "../build/SandboxApplication/Debug/RenderSurface.fs")
if err then error("Copy fragment shader source failed!") end
ok, err = os.copyfile("graphics/shaders/RenderSurfaceVert.shader", "../build/SandboxApplication/Debug/RenderSurface.vs")
if err then error("Copy vertex shader source failed!") end
filter { "system:linux" }
prebuildcommands {
-- Copy shaders
"cp graphics/shaders/fragment.shader ../build/SandboxApplication/Debug/test.fs",
"cp graphics/shaders/vertex.shader ../build/SandboxApplication/Debug/test.vs",
"cp graphics/shaders/RenderSurfaceFrag.shader ../build/SandboxApplication/Debug/RenderSurface.fs",
"cp graphics/shaders/RenderSurfaceVert.shader ../build/SandboxApplication/Debug/RenderSurface.vs"
}