title: Complex builds in Visual Studio
body: <p>I have a few things that I cannot find a good way to perform in Visual Studio:</p>
  
  <ol>
  <li><p>Pre-build step invokes a code generator that generates some source files which are later compiled. This can be solved to a limited extent by adding blank files to the project (which are later replaced with real generated files), but it does not work if I don't know names and/or the number of auto-generated source files. I can easily solve it in <code>GNU make</code> using <code>$(wildcard generated/*.c)</code>. How can I do something similar with Visual Studio?</p></li>
  <li><p>Can I prevent pre-build/post-build event running if the files do not need to be modified (<code>"make"</code> behaviour)? The current workaround is to write a wrapper script that will check timestamps for me, which works, but is a bit clunky.</p></li>
  <li><p>What is a good way to locate external libraries and headers installed outside of VS? In *nix case, they would normally be installed in the system paths, or located with <code>autoconf</code>. I suppose I can specify paths with user-defined macros in project settings, but where is a good place to put these macros so they can be easily found and adjusted?</p></li>
  </ol>
  
  <p>Just to be clear, I am aware that better Windows build systems exist (<code>CMake</code>, <code>SCons</code>), but they usually generate VS project files themselves, and I need to integrate this project into existing VS build system, so it is desirable that I have just plain VS project files, not generated ones.</p>