[CMake] VS resource compiler preprocessor defines

"Sören Freudiger" muffmolch at gmx.de
Tue Jan 18 09:01:13 EST 2011


hmm.. okay. That means I have to set the target properties for the cxx files like this:


add_executable( ${MY_PROJECT} WIN32 ${SOURCE_FILES} )
set_target_properties( ${MY_PROJECT} PROPERTIES COMPILE_DEFINITIONS ${MY_CXX_PRE_DEFS}) 

with MY_CXX_PRE_DEFS: DEF1;DEF2;DEF3

or

set_target_properties( ${MY_PROJECT} PROPERTIES COMPILE_FLAGS ${MY_CXX_PRE_DEFS}) 

with MY_CXX_PRE_DEFS: -DDEF1;-DDEF2;-DDEF3

But what's about the rc defines? Do I have to set the target properties for each file???

SirAnn


-------- Original-Nachricht --------
> Datum: Tue, 18 Jan 2011 14:42:28 +0100
> Von: Andreas Pakulat <apaku at gmx.de>
> An: cmake at cmake.org
> Betreff: Re: [CMake] VS resource compiler preprocessor defines

> On 18.01.11 14:11:15, "Sören Freudiger" wrote:
> > Hello
> > Right now the CXX preprocessor defines are also used as the preprocessor
> defines for the resource compiler (rc). Is there a way of changing that
> behavior? We are using different preprocessor defines for cl and rc. And
> sometimes we even connot use the cxx flags for the rc compiler...
> > 
> > Any idea?
> 
> If you don't use add_definitions, but instead use set_target_properties
> with COMPILE_DEFINITIONS and set_source_properties then you should be able
> to set completely different defines for the .rc source files than the rest
> of the same target.
> 
> Andreas
> 
> -- 
> Never look up when dragons fly overhead.
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake

-- 
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail


More information about the CMake mailing list