widberg / bgfx.cmake

https://github.com/bkaradzic/bgfx.cmake. Independently maintained CMake build scripts for bgfx. Released under public domain.
https://github.com/bkaradzic/bgfx.cmake
Creative Commons Zero v1.0 Universal
286 stars 252 forks source link

Shader includes (bgfx_shader.sh...) not copied on install #63

Closed handsomematt closed 4 years ago

handsomematt commented 4 years ago

When using shaderc normally you would include bgfx_shader.sh or bgfx_compute.sh, these are located in bgfx/src. When the library is installed these files disappear, removing the ability to use shaderc effectively.

A possible solution I can think of is to copy src/bgfx_shader.sh -> $INSTALL_TARGET/include/bgfx_shader.sh - but I'm not sure how good this would be.

handsomematt commented 4 years ago

copying bgfx_shader.sh to $INSTALL_TARGET/include/bgfx/ and passing the following variable to shaderc has worked fine for me:

get_target_property(BGFX_SHADER_INCLUDE_PATH bgfx::bgfx INTERFACE_INCLUDE_DIRECTORIES)

handsomematt commented 4 years ago

solved in #82