[CMake] How to get rid off predefine "XXX_EXPORTS" @add_library(XXX SHARED ...)

"Sören Freudiger" muffmolch at gmx.de
Wed Jan 5 04:37:18 EST 2011


Thanks a lot! Exactly what I was looking for ;-) I really missed that chapter

-------- Original-Nachricht --------
> Datum: Wed, 05 Jan 2011 10:12:07 +0100
> Von: Michael Wild <themiwi at gmail.com>
> An: cmake at cmake.org
> Betreff: Re: [CMake] How to get rid off predefine "XXX_EXPORTS" @add_library(XXX SHARED ...)

> On 01/05/2011 10:05 AM, "Sören Freudiger" wrote:
> > Hi
> > I have a problem. After running CMake (VS 2003/2008 project) there's
> always a EXPORT preprocessor define in my project setting that I don't need.
> > 
> > add_library(XXX SHARED ...)
> > 
> > --> predefine XXX_EXPORTS
> > 
> > I manually set this predefine in a correct way (means in upper case!).
> CMake generate something like:
> > 
> > testProject_EXPORTS
> > 
> > but it should be:
> > 
> > TESTPOJECT_EXPORTS
> > 
> > Is there a way to supress this predfine?
> > 
> > Best regards 
> > SirAnn
> > 
> > 
> > 
> 
> Just set the target property DEFINE_SYMBOL to TESTPROJECT_EXPORTS, then
> you don't have to set it manually any more and you get rid of
> testProject_EXPORTS:
> 
> set_target_properties(testProject PROPERTIES
>   DEFINE_SYMBOL TESTPROJECT_EXPORTS)
> 
> 
> HTH
> 
> Michael
> _______________________________________________
> 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

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de


More information about the CMake mailing list