Added the compilation of shaders to the build process.

This commit is contained in:
Warwick 2023-11-28 11:49:09 +00:00
parent 3a4030ad89
commit 66af7fc1e8
2 changed files with 8 additions and 0 deletions

View file

@ -33,3 +33,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC
${GLFW_LIBRARIES}
${Vulkan_LIBRARIES}
${GLM_LIBRARY_DIRS})
add_custom_command(TARGET ${PROJECT_NAME}
PRE_BUILD
COMMAND ./compile_shaders.sh)

View file

@ -1,3 +1,7 @@
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR
glslc shaders/shader.vert -o shaders/shader.vert.spv
glslc shaders/shader.frag -o shaders/shader.frag.spv