[CMake] Output name and path depeding on debug/release mode

Tristan Carel tristan.carel at gmail.com
Mon Sep 10 05:56:34 EDT 2007


On 9/6/07, Fieselmann, Andreas (ext) <andreas.fieselmann.ext at siemens.com> wrote:
>
>
> Dear CMake users!
>
> I am using Visual C++ 6.0 and I'd like to have different output names for
> the dlls I am building depending if they are in release or debug mode.
> Additionally they should be placed in a certain path.
> For example:
> release mode: C:\anypath\outputdll_release.dll
>
> debug mode:   C:\anypath\outputdll_debug.dll
>
> How can I configure CMake to do this ? Any help is very much appreciated.

You can specify the postfix name of a specific target by setting its
property <CONFIG>_POSTFIX with the command SET_TARGET_PROPERTIES.
You can also define a postfix name to all defined targets in your
project by setting the variable CMAKE_<CONFIG>_POSTFIX.

More information in the documentation of the SET_TARGET_PROPERTIES command.

HTH
-- 
Tristan Carel
I miss SCR!


More information about the CMake mailing list