[CMake] Re: Visual Studio Resource Issues
Omar Souka
cmake at souka.com
Tue Feb 13 10:30:43 EST 2007
On 2/13/07, Omar Souka <cmake at souka.com> wrote:
>
> Hi,
>
> I need to process .rc files differently depending on whether the build is
> debug or release. The problem is that the resource compiler is only passed
> defines that are defined using add_definitions. add_definitions doesn't
> appear to provide a way to change the defines based on configuration. 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. Is there any way to do
> build type conditional resource file processing?
>
> Thanks,
>
> Omar
>
Just figured out a way to do this. This works for both C code and resource
files
add_definitions(
-D$(ConfigurationName)-Config
)
/D Debug-Config or /D Release-Config is set depending on configuration
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070213/3a372afa/attachment.html
More information about the CMake
mailing list