I'm currently trying to switch between a few different default icons in a Visual C++ .rc file using #ifdef
tags.
The builds switching the #define value are being created through the command line using MSBuild.
The difficulty I have been running into is that using Visual Studio 2010, in order to pass a preprocessor definition to the resource compiler you must define it in the project settings (Config Properties → Resources → General).
This makes it difficult to use an #ifdef
tag, because using this method it will always be defined in the resource compiler.
I would love to define it to a value, so that I might use a preprocessor #if SOMEVALUE == 4
might work, but I cannot seem to find a way to pass a Preprocessor definition + value to MSBuild via the command line.
Is there a way to pass a preprocessor definition directly through to the resource compiler or a way to define a value for a preprocessor definition via the command line for MSBuild?