[CMake] Debug libraries

Leopold Palomo Avellaneda leo at alaxarxa.net
Fri Aug 1 16:21:36 EDT 2008


A Dimarts 29 Juliol 2008, Yuri Timenkov va escriure:
> On Monday 28 July 2008 22:14:51 Leopold Palomo-Avellaneda wrote:
> > Hi,
> >
> > I'm not a windows user and now, sadly, I have to develop an application
> > with Visual Studio 2005. I'm porting an application that use OpenGL,
> > Coin3d, SoQt and Qt4.4.
> >
> > I have created the respective FindSoQt and FindCoin that reports me the
> > libraries with the two versions (debug and release).
> >
> > One thing that i have not be able to solve is that when I create the MS
> > Visual Studio Project, in the Debug option, the Qt libraries are the
> > debug ones (with d) and in the release are the "normal" (without d).
> > However, I couldn't do the same with the others and I don't know how I
> > can tell MSStudio that when compile in Debug chose the debug ones.
> >
> > I have created my Find... with XXXX_LIBRARY and XXXX_LIBRARY_DEBUG.
>
> It's better to have 3 variables:
> XXX_LIBRARY_RELEASE, XXX_LIBRARY_DEBUG and XXX_LIBRARY.
> First ones are determined with find_library, the latter one:
> if(XXX_LIBRARY_RELEASE AND XXX_LIBRARY_DEBUG)
> 	set(XXX_LIBRARY optimized ${XXX_LIBRARY_RELEASE} debug
> ${XXX_LIBRARY_DEBUG}) endif(XXX_LIBRARY_RELEASE AND XXX_LIBRARY_DEBUG)
>
> and link your applications to XXX_LIBRARY. Mike's script does same thing
> but a bit more generalized. Also, you can look to FindBoost.cmake. But the
> key point is to use "debug" and "optimized" keywords.
>

Ok,

done. Thanks to all.

Best regards,

Leo



-- 
--
Linux User 152692
PGP: 0xF944807E
Catalonia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080801/4d48affd/attachment.pgp>


More information about the CMake mailing list