diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-10-16 22:54:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-17 03:24:33 +0300 |
commit | df816d534f195b9a38383e8b0dd806d0586a6fc0 (patch) | |
tree | 2ed79af5dd24d04a2fae0fbc6e83ffe8399f6a50 /build_files | |
parent | b618c185cb7c5930980e459c84b8818a0fba1f1d (diff) |
Fix cmake not triggering rebuild on .glsl changes
At least on windows we do not re-run datatoc when the .glsl files change.
To test is simple, just change edit_mesh_overlay_common_lib.glsl
remove lines, write plain text, ..., now rebuild and go in edit mode
with the default cube.
I also had to remove the entry in gpu/CMakeLists.txt for
gpu_shader_material.glsl since this was being tracked directly, as well
as running data_to_c_simple (otherwise CMake raises an error for
duplicated entries).
We probably want to do the same for the other datatoc functions.
Reviewers: LazyDodo, brecht
Differential Revision: https://developer.blender.org/D3803
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/cmake/macros.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index be24de94c7b..d6ddb26e293 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -1232,6 +1232,8 @@ function(data_to_c_simple get_filename_component(_file_to ${CMAKE_CURRENT_BINARY_DIR}/${file_from}.c REALPATH) list(APPEND ${list_to_add} ${_file_to}) + source_group(Generated FILES ${_file_to}) + list(APPEND ${list_to_add} ${file_from}) set(${list_to_add} ${${list_to_add}} PARENT_SCOPE) get_filename_component(_file_to_path ${_file_to} PATH) |