Show shader files in IDE
This commit is contained in:
parent
5d93616e03
commit
267f6221bf
2 changed files with 5 additions and 0 deletions
|
@ -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)
|
|
@ -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)
|
||||
|
|
Reference in a new issue