[Bf-blender-cvs] [28a3958cb37] blender2.8: Fix cmake not triggering rebuild on .glsl changes
Dalai Felinto
noreply at git.blender.org
Tue Oct 16 22:11:22 CEST 2018
Commit: 28a3958cb376507307b59479c5a93fb4ecc28f79
Author: Dalai Felinto
Date: Tue Oct 16 16:54:59 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB28a3958cb376507307b59479c5a93fb4ecc28f79
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
===================================================================
M build_files/cmake/macros.cmake
M source/blender/gpu/CMakeLists.txt
===================================================================
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 762e5499554..3dc6f599c69 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)
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 85a3b604e33..2eb24f08227 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -87,8 +87,6 @@ set(SRC
intern/gpu_vertex_format.c
intern/gpu_viewport.c
- shaders/gpu_shader_material.glsl
-
GPU_attr_binding.h
GPU_batch.h
GPU_batch_presets.h
More information about the Bf-blender-cvs
mailing list