Add support to compile renderergl2 (currently unimplemented)

This commit is contained in:
smallmodel 2024-12-01 19:21:07 +01:00
parent 4ea598d76b
commit 4f699f3b58
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512
14 changed files with 83 additions and 49 deletions

View file

@ -0,0 +1,14 @@
file(GLOB_RECURSE SHADER_GLSL_SRCS "*.glsl")
add_executable(stringify "../tools/stringify.cpp")
foreach (shader ${SHADER_GLSL_SRCS})
get_filename_component(shaderfile ${shader} NAME_WE)
list(APPEND SHADER_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${shaderfile}.c)
set_source_files_properties(${shaderfile}.c PROPERTIES GENERATED TRUE)
add_custom_command(OUTPUT ${shaderfile}.c
DEPENDS stringify ${shader}
COMMAND stringify ${shader} ${CMAKE_CURRENT_BINARY_DIR}/${shaderfile}.c
COMMENT "Generate c source for ${shader}: ${shaderfile}.c"
)
endforeach()