I've written my own version of bgfx_compile_shaders() to compile all provided variants of a given shader - _bgfx_shaderc_parse() does expose the --define CLI option, however there is a typo in the option name (--defines instead of --define) and it looks like the semicolons aren't escaped quite enough times to get around CMake list expansion:
|
# --define |
|
if(ARG_DEFINES) |
|
list(APPEND CLI "--defines") |
|
set(DEFINES "") |
|
foreach(DEFINE ${ARG_DEFINES}) |
|
if(NOT "${DEFINES}" STREQUAL "") |
|
set(DEFINES "${DEFINES}\\\\;${DEFINE}") |
|
else() |
|
set(DEFINES "${DEFINE}") |
|
endif() |
|
endforeach() |
|
list(APPEND CLI "${DEFINES}") |
|
endif() |
I am aware this is not part of the public interface, but figured I would report this anyway incase it does end up getting used at some point.
I've written my own version of
bgfx_compile_shaders()to compile all provided variants of a given shader -_bgfx_shaderc_parse()does expose the--defineCLI option, however there is a typo in the option name (--definesinstead of--define) and it looks like the semicolons aren't escaped quite enough times to get around CMake list expansion:bgfx.cmake/cmake/bgfxToolUtils.cmake
Lines 460 to 472 in 6e2138a
I am aware this is not part of the public interface, but figured I would report this anyway incase it does end up getting used at some point.