91df2beee3
Add the necessary CMake code to copy the contents in a string source shader (GLSL or GLASM) to a header file then consumed by video_core files. This allows editting GLSL in its own files without having to maintain them in source files. For now, only OpenGL presentation shaders are moved, but we can add GLASM presentation shaders and static SPIR-V generation through glslangValidator in the future.
11 lines
344 B
CMake
11 lines
344 B
CMake
set(SOURCE_FILE ${CMAKE_ARGV3})
|
|
set(HEADER_FILE ${CMAKE_ARGV4})
|
|
set(INPUT_FILE ${CMAKE_ARGV5})
|
|
|
|
get_filename_component(CONTENTS_NAME ${SOURCE_FILE} NAME)
|
|
string(REPLACE "." "_" CONTENTS_NAME ${CONTENTS_NAME})
|
|
string(TOUPPER ${CONTENTS_NAME} CONTENTS_NAME)
|
|
|
|
file(READ ${SOURCE_FILE} CONTENTS)
|
|
|
|
configure_file(${INPUT_FILE} ${HEADER_FILE} @ONLY)
|