Archived
1
Fork 0

Show shader files in IDE

This commit is contained in:
redstrate 2020-09-22 16:21:35 -04:00
parent 5d93616e03
commit 267f6221bf
2 changed files with 5 additions and 0 deletions

View file

@ -74,5 +74,7 @@ add_subdirectory(platforms)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
source_group(Shaders shaders)
add_subdirectory(engine)
add_subdirectory(tools)

View file

@ -32,8 +32,11 @@ function(add_shader)
compile_shader(${shader})
list(APPEND SPV_FILES ${CMAKE_BINARY_DIR}/${MYFILE_WITHOUT_EXT}.glsl)
list(APPEND SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../${shader})
endforeach()
add_custom_target(Shaders SOURCES ${SRC_FILES})
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/shaders)
add_custom_target(BuildShaders DEPENDS ${SPV_FILES} ShaderCompilerTool)