[CMake] 3rd party modules

Kedzierski, Artur CIV NAVSURFWARCENDIV CORONA artur.kedzierski at navy.mil
Fri Sep 29 14:46:05 EDT 2006


	That didn't do it. This is what I am doing:
ADD_LIBRARY(Foo foo.cpp)
SET_TARGET_PROPERTIIES(Foo PROPERTIES DEBUG_POSTFIX "Debug") 
GET_TARGET_PROPERTY(LIBNAME Foo LOCATION)
	I am still getting libfoo.a for the ${LIBNAME} but
libfooDebug.a is generated.
	Am I missing something?

--
Artur Kedzierski

-----Original Message-----
From: Brad King [mailto:brad.king at kitware.com] 
Sent: Friday, September 29, 2006 8:46
To: Kedzierski, Artur CIV NAVSURFWARCENDIV CORONA
Cc: CMake Mailing List
Subject: Re: [CMake] 3rd party modules

Kedzierski, Artur CIV NAVSURFWARCENDIV CORONA wrote:
> 	Thanks Brad. 
> 	So for those two lines: 
> SET(CMAKE_DEBUG_POSTFIX "Debug")
> GET_TARGET_PROPERTY(LIBNAME Foo LOCATION)
> 	Should I get?
> <prefix>/lib/libfooDebug.a
> 	I am getting (no 'Debug'):
> <prefix>/lib/libfoo.a
> 	but libfooDebug.a is generated.

The debug postfix has to be set when the library is created.  Better yet
use SET_TARGET_PROPERTIES just after the ADD_LIBRARY call to set the
DEBUG_POSTFIX target property.

-Brad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4670 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20060929/b3c9542b/smime.bin


More information about the CMake mailing list