<br><br><div><span class="gmail_quote">On 2/13/07, <b class="gmail_sendername">Omar Souka</b> &lt;<a href="mailto:cmake@souka.com">cmake@souka.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>I need to process .rc files differently depending on whether the build is debug or release.&nbsp; The problem is that the resource compiler is only passed defines that are defined using add_definitions.&nbsp;&nbsp; add_definitions doesn&#39;t appear to provide a way to change the defines based on configuration.&nbsp; I have the same issue when compiling files, but I deal with it by setting extra flags in CMAKE_C_FLAGS_(DEBUG,RELEASE) to indicate the build type, but these flags are not passed to the resource compiler.&nbsp; Is there any way to do build type conditional resource file processing?
<br><br>Thanks,<br><span class="sg"><br>Omar<br>
</span></blockquote></div><br>Just figured out a way to do this.&nbsp; This works for both C code and resource files<br><br>&nbsp;&nbsp;&nbsp; add_definitions(<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; -D$(ConfigurationName)-Config <br>&nbsp;&nbsp;&nbsp; )<br><br>/D Debug-Config or /D Release-Config is set depending on configuration
<br>