SET(GRAPH_SHADER_HEADER_PATH ${ROOT_INCLUDE_PATH}/hgl/graph/shader)
SET(GRAPH_SHADER_NODE_HEADER_PATH ${GRAPH_SHADER_HEADER_PATH}/node)
SET(GRAPH_SHADER_PARAM_HEADER_PATH ${GRAPH_SHADER_HEADER_PATH}/param)

file(GLOB GRAPH_SHADER_NODE_HEADER_FILES ${GRAPH_SHADER_NODE_HEADER_PATH}/*.h)
file(GLOB GRAPH_SHADER_PARAM_HEADER_FILES ${GRAPH_SHADER_PARAM_HEADER_PATH}/*.h)

file(GLOB GRAPH_SHADER_NODE_SOURCE_FILES FILES node/*.*)
file(GLOB GRAPH_SHADER_PARAM_SOURCE_FILES FILES param/*.*)

file(GLOB GRAPH_SHADER_NODE_FIN_SOURCE_FILES FILES node/fin/*.*)

SET(GRAPH_SHADER_NODE_FILES ${GRAPH_SHADER_NODE_HEADER_FILES} ${GRAPH_SHADER_NODE_SOURCE_FILES})
SET(GRAPH_SHADER_PARAM_FILES ${GRAPH_SHADER_PARAM_HEADER_FILES} ${GRAPH_SHADER_PARAM_SOURCE_FILES})

source_group("Shader Maker\\Node\\Fin" FILES ${GRAPH_SHADER_NODE_FIN_SOURCE_FILES})
source_group("Shader Maker\\Node" FILES ${GRAPH_SHADER_NODE_FILES})
source_group("Shader Maker\\Param" FILES ${GRAPH_SHADER_PARAM_FILES})

SET(GRAPH_SHADER_MAKER_SOURCE   ${GRAPH_SHADER_HEADER_PATH}/ShaderMaker.h
                                ShaderMaker.cpp
                                DefaultShader.cpp)

source_group("Shader Maker" FILES ${GRAPH_SHADER_MAKER_SOURCE})

SET(GRAPH_SPV_SOURCE    ${GRAPH_SHADER_HEADER_PATH}/glsl2spv.h
                        glsl2spv.cpp)

SOURCE_GROUP("SPIR-V" FILES ${GRAPH_SPV_SOURCE})

add_cm_library(ULRE.Shader "ULRE"   ${GRAPH_SHADER_HEADER_PATH}/common.h
                                    ${GRAPH_SHADER_NODE_FILES}
                                    ${GRAPH_SHADER_NODE_FIN_SOURCE_FILES}
                                    ${GRAPH_SHADER_PARAM_FILES}
                                    ${GRAPH_SHADER_MAKER_SOURCE}
                                    ${GRAPH_SPV_SOURCE})
