[CMake] Setting "Link Library Dependencies" Flag in VS 2005

Stefan Buschmann s_buschmann at gmx.de
Mon May 5 07:59:03 EDT 2008


There doesn't seem to be a command line switch for this, because the 
compiler/linker can't know the dependencies when called independently. 
(see 
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=83916&SiteID=1). 
So you can't use ADD_DEFINITIONS or similar to set this option from CMake.

But I don't really see the purpose here, because this kind of thing is 
exactly what CMake does for you. If you call TARGET_LINK_LIBRARIES with 
all the project names that you depend on,
the needed libs are linked to the project and you should also end up 
with the correct dependencies. So this is perhaps the other way round as 
to specify only the dependencies and let the linking be done 
automatically - should be equal work, though :-)

Stefan


Malhotra, Anupam schrieb:
> Hi Bill
>
> I opened the .vcproj file being generated for my project in edit
> mode.Below is the section where the link library dependencies flag is
> being set:
>
> <Tool
> 	Name="VCLibrarianTool"
> 	LinkLibraryDependencies="false"
> 	OutputFile="E:\Nightly Build\Visual Studio 8
> 2005MT\core\client_library\output\MT\$(OutDir)\sntlsp_lsadmin.lib"
> /> 
>
> Note that I want to set this " LinkLibraryDependencies " flag to true
> using CMake. How can I achieve that?
>
> Thanks and Regards
> Anupam Malhotra
>
>
> -----Original Message-----
> From: Bill Hoffman [mailto:bill.hoffman at kitware.com] 
> Sent: Friday, May 02, 2008 6:13 PM
> To: Malhotra, Anupam
> Cc: cmake at cmake.org
> Subject: Re: [CMake] Setting "Link Library Dependencies" Flag in VS 2005
>
> Malhotra, Anupam wrote:
>   
>> Hi
>>
>>  
>>
>> I have created a .sln (for VS 2005) using Cmake.In the sln, Project 
>> Properties->Configuration Properties->Librarian->Link Library 
>> Dependencies flag is by default set to NO. I want to set this flag
>>     
> value 
>   
>> to YES using Cmake. How can this be achieved? I require this flag to
>>     
> be 
>   
>> YES so that the library outputs from project dependencies are 
>> automatically linked in. Any help would be greatly appreciated. Thanks
>>     
>
>   
>> in Advance
>>
>>  
>>     
> Can you figure out what the command line flag is for this?  Just turn it
>
> on by hand and go to command line and see what changed.  You should be 
> able to use that command line flag.
>
> -Bill
> The information contained in this electronic mail transmission 
> may be privileged and confidential, and therefore, protected 
> from disclosure. If you have received this communication in 
> error, please notify us immediately by replying to this 
> message and deleting it from your computer without copying 
> or disclosing it.
>
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080505/d20a28c6/attachment-0001.htm>


More information about the CMake mailing list