[Cmake] Vc project file debug/release

William A. Hoffman billlist at nycap.rr.com
Thu, 11 Mar 2004 16:36:43 -0500


Both LINK_LIBRARIES and TARGET_LINK_LIBRARIES support
debug and optimized libraries:


TARGET_LINK_LIBRARIES: Link a target to given libraries.

  TARGET_LINK_LIBRARIES(target library1
                        <debug | optimized> library2
                        ...)

Specify a list of libraries to be linked into the specified target The debug and optimized strings may be used to indicate that the next library listed is to be used only for that specific type of build 


At 04:06 PM 3/11/2004, Klaas Holwerda wrote:
> Hi,
>
>I need to link different libraries in debug, release etc. mode.
>But don't understand how to differentiate/choose the libraries
>for each specific configuration that Cmake generates in its Vc project files.
>
>I do see all kinds of flag variables, for  the different configurations,
>but how does one choose/set which libraries are linked for each configuration.
>And next how to do it for things like INCLUDE_DIRECTORIES and ADD_DEFINITIONS etc.?
>
>But then once i know this, what will be choosen when just using make files, where there would be only one valid
>configuration.
>
>Or am i missing the concept, and should the configurations generated in the VC project files not dependon the libraries that are used.
>e.g. if some base library is compiled in debug mode, can the Cmake generated library always be with or  without debug?
>And do all configuration settings in the project files make sence , independent of the  linked library its compilation mode to be debug or not?
>
>More concrete, when my wxWindows library is compiled in debug mode, then my library also needs to be in debug mode,
>else there is a conflict and compilation does fail.
>And therefore i need to have the Cmake generated VC project file to use different libraries for release and debug configuration.
>
>Thanks for some help to make me understand how i should solve this,
>
>Klaas
>
>
>
>_______________________________________________
>Cmake mailing list
>Cmake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake