Improvments on the shader compiler utility

The custom command didn't recognize bgfx::shaderc and the generator expression seems bettter. I also added an include option since it might be important to be able to define those.

Added changes to each of the cmake files to make sure bgfx:: is defined

Also add an output variable name parameter.

Co-Authored-By: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Hristo Iliev
2023-03-24 17:35:10 +02:00
committed by Sandy
parent 0ab856a9dc
commit 9670cf4f43
6 changed files with 33 additions and 4 deletions

View File

@@ -26,6 +26,12 @@ if(BGFX_BUILD_TOOLS_BIN2C AND BGFX_CUSTOM_TARGETS)
add_dependencies(tools bin2c)
endif()
if(BGFX_BUILD_TOOLS_BIN2C)
if(TARGET bin2c AND NOT TARGET bgfx::bin2c)
add_executable(bgfx::bin2c ALIAS bin2c)
endif()
endif()
if(ANDROID)
target_link_libraries(bin2c PRIVATE log)
elseif(IOS)