[Cmake] CMake 1.8.2: Visual Studio 6 library postfix

David Svoboda xsvobod2 at informatics.muni.cz
Mon, 2 Feb 2004 16:14:08 +0100


On Mon, 2 Feb 2004, Stefan Kowski wrote:

> Hi,
>
> I posted a question for library naming with VS6 last week, but I assume
> there is no solution for my problem. Therefore a suggestion: is it possible
> to extend the ADD_LIBRARY() command to accept different names for the
> target?
>
> Example: ADD_LIBRARY(debug TestLibd optimized TestLib SHARED <...>)
>
> This different names can then be used to generate the .dsp files.

A what about definition special variable called for example "DEBUG_FLAG"

SET(DEBUG_FLAG "d") ... define only in the case of debug version

ADD_LIBRARY(TestLib${DEBUG_FLAG} SHARED <...>)

David