mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-07 03:04:05 +00:00
[client] egl: generate header file with #define for desktop shader
Instead of duplicating the #defines from the shader into the C code, this commit adds a custom CMake rule that exports all the #defines from a shader into a C header.
This commit is contained in:
@@ -32,3 +32,11 @@ function(make_object out_var)
|
||||
set(${out_var}_OBJS "${result}" PARENT_SCOPE)
|
||||
set(${out_var}_INCS "${result_h}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(make_defines in_file out_file)
|
||||
add_custom_command(OUTPUT ${out_file}
|
||||
COMMAND grep "^#define" "${in_file}" > "${out_file}"
|
||||
DEPENDS ${in_file}
|
||||
COMMENT "Creating #defines from ${in_file}"
|
||||
)
|
||||
endfunction()
|
||||
|
Reference in New Issue
Block a user