[CMake] VS resource compiler preprocessor defines
"Sören Freudiger"
muffmolch at gmx.de
Tue Jan 18 11:40:51 EST 2011
ok. But it seems as the rc-file inherits the global defines of the project :(
set_target_properties(${MY_PROJECT} PROPERTIES COMPILE_DEFINITIONS ${GLOBAL_DEF} )
set_source_files_properties(${MY_RC_FILE} COMPILE_DEFINITIONS "RC_DEF")
-->
properties of ${MY_RC_FILE} in VS 2003:
/d "RC_DEF" /d "GLOBAL_DEF" /d "_WINDOWS" /d "NDEBUG" /d "CMAKE_INTDIR=\"Release\"" /I ... /fo"XXX.dir\Release/my_rc_file.res"
That means: I can set extra defines for rc-files, but I cannot set global defines that are ignoered for rc files.
What's the problem?
-------- Original-Nachricht --------
> Datum: Tue, 18 Jan 2011 17:24:57 +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 15:01:13, "Sören Freudiger" wrote:
> > 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
>
> Either this, or using a cmake list as MY_CXX_PRE_DEFS.
>
> > But what's about the rc defines? Do I have to set the target properties
> for each file???
>
> set_source_files_properties takes a list of files, so you can specify all
> .rc files that should get different flags there.
>
> Andreas
>
> --
> Advancement in position.
> _______________________________________________
> 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
--
Ihr GMX Postfach immer dabei: die kostenlose GMX Mail App für Android.
Komfortabel, sicher und schnell: www.gmx.de/android
More information about the CMake
mailing list