1

I have a big project with an external build tool to build glsl files which converts it to c++ header file (a python script that generates this header file) now everytime i modify any of the glsl files, i want the build system to run this external tool and then compile my project, but somehow i am not able to do this with the custom build step, i tried adding these dependencies "$(ProjectDir)Core\shaders\GLSL\Shaders*.glsl" as part of the additional dependencies but somehow it doesnt work and i have to rebuild the entire project as the same script is part of my pre-build event.

In simple terms, i want this external tool to run everytime any of my glsl files are modified (they are all in one directory) before i build or run the project!

Can someone please tell me how to do this?

Charles
  • 50,943
  • 13
  • 104
  • 142
Sundar Iyer
  • 59
  • 1
  • 4

1 Answers1

0

I dont remember, can we run custom scripts only on specific file changes, but i solve similar problem by adding Pre-Build Event in project settings. You can read about this here -> http://msdn.microsoft.com/en-us/library/42x5kfw4(v=vs.80).aspx

  • I second that. In VS2010 go to Properties->Configuration Properties->Build Events->Pre Build Event. In the command line entry you can add what you like. I am often using the Post Build Event to copy dependencies and such. – ervinbosenbacher May 04 '12 at 21:45
  • Actually I have this setup correctly, but the problem is that this event is not triggered or there is no way to trigger this when any of my glsl files are modified, so I have to rebuild the project every time I modify any glsl files that the external tool uses! this is a bummer! – Sundar Iyer May 04 '12 at 22:03