2021-01-17 18:03:09 -06:00
|
|
|
project(Couch)
|
|
|
|
|
2021-01-18 18:25:47 -06:00
|
|
|
macro(add_shader shaderfile)
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${shaderfile}.h
|
|
|
|
COMMAND perl "${CMAKE_CURRENT_SOURCE_DIR}/makeheaders.pl" ${CMAKE_CURRENT_SOURCE_DIR}/${shaderfile} ${CMAKE_CURRENT_BINARY_DIR}/${shaderfile}.h
|
|
|
|
DEPENDS ${shaderfile} makeheaders.pl
|
|
|
|
)
|
|
|
|
endmacro()
|
2021-01-17 18:03:09 -06:00
|
|
|
|
2021-01-18 18:25:47 -06:00
|
|
|
add_shader(flat.vert)
|
|
|
|
add_shader(flat.frag)
|
2021-01-19 16:01:37 -06:00
|
|
|
add_shader(screen.vert)
|
|
|
|
add_shader(screen.frag)
|
2021-01-23 11:54:34 -06:00
|
|
|
add_shader(skybox.vert)
|
|
|
|
add_shader(skybox.frag)
|
2021-01-17 18:03:09 -06:00
|
|
|
|
2021-01-18 18:25:47 -06:00
|
|
|
add_custom_target(shader_headers
|
2021-01-23 11:54:34 -06:00
|
|
|
DEPENDS flat.vert.h flat.frag.h screen.vert.h screen.frag.h skybox.vert.h skybox.frag.h
|
2021-01-18 18:25:47 -06:00
|
|
|
COMMENT "Generated shaders headers.")
|