diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-12-10 11:59:30 -0800 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-12-10 11:59:51 -0800 |
commit | 655b777635439d64f46930b20e6436c2f36364dc (patch) | |
tree | afea63d31c098338d530ed7e8c079524b8c59913 /gyp | |
parent | b7a238f425737a222304aff241b927b16c693fc7 (diff) | |
download | qtlocation-mapboxgl-655b777635439d64f46930b20e6436c2f36364dc.tar.gz |
[core] don't rebuild shaders unless they change
Diffstat (limited to 'gyp')
-rw-r--r-- | gyp/shaders.gypi | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/gyp/shaders.gypi b/gyp/shaders.gypi index 8004874376..83d40a52f9 100644 --- a/gyp/shaders.gypi +++ b/gyp/shaders.gypi @@ -4,31 +4,29 @@ 'target_name': 'shaders', 'type': 'none', 'hard_dependency': 1, - 'actions': [ + + 'sources': [ + '<!@(find ../src/mbgl/shader -name "*.glsl")' + ], + + 'rules': [ { - 'action_name': 'Build Shaders', - 'inputs': [ - '../scripts/build-shaders.py', - '<!@(find ../src -name "*.glsl")' - ], - 'outputs': [ - '<(SHARED_INTERMEDIATE_DIR)/include/mbgl/shader/shaders.hpp', - '<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gl.cpp', - '<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gles2.cpp', - ], - 'action': ['../scripts/build-shaders.py', '<(SHARED_INTERMEDIATE_DIR)', '<@(_inputs)'], + 'rule_name': 'Build Shaders', + 'message': 'Building shader', + 'extension': 'glsl', + 'inputs': [ '../scripts/build-shaders.py' ], + 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/include/mbgl/shader/<(RULE_INPUT_ROOT).hpp' ], + 'action': [ '../scripts/build-shaders.py', '<(RULE_INPUT_PATH)', '<(SHARED_INTERMEDIATE_DIR)/include/mbgl/shader/<(RULE_INPUT_ROOT).hpp' ], + 'process_outputs_as_sources': 1, } ], + 'direct_dependent_settings': { - 'sources': [ - '<(SHARED_INTERMEDIATE_DIR)/include/mbgl/shader/shaders.hpp', - '<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gl.cpp', - '<(SHARED_INTERMEDIATE_DIR)/src/shader/shaders_gles2.cpp' - ], 'include_dirs': [ - '<(SHARED_INTERMEDIATE_DIR)/include/', + '<(SHARED_INTERMEDIATE_DIR)/include', ] } + }, ] } |