Skip to content

Only recreate embedded shader files if existing ones are obsolete

Regarding #2 (closed)

Shader embedding files are now only recreated if a shader has changed.

(I have experimented with add_custom_command, but failed to properly set up the dependency relations. The approach i tried is to add a custom command which a) runs cmake -P path/to/embedShader.cmake and b) creates a "stamp" file. Then, a target is added which depends on that stamp file, which is then added as a dependency to the real target (glow-extras-pipeline for example). However, the output of the custom script has to be added as a source file to the target itself, which happens at config time (instead of pre-build). So for now, CMake has to be ran to re-generate embed files. Helpful article: https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/)

Edited by Jonathan Kunstwald

Merge request reports

Loading