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

Hisham Chowdhury hisham_chow at yahoo.com
Thu Aug 13 18:17:42 EDT 2009


Hello,
I saw this issue in one of the email thread online. I am also facing the same issue. So, I am wondering, were anybody able to solve this issue?

Problem description(from email from Anupam Malhotra):
Let me tell u a small example:

I have a project say master.sln and in that solution I am having 3
different projects(.vcproj) which are making three libraries:
a.lib,b.lib,c.lib.

Now using the command ADD_DEPENDENCIES, I am setting the project
dependencies to specify that a.lib depends on b.lib and c.lib. Whenever
we build a.lib, this would build b.lib and c.lib before it actually
builds a.lib since b.lib and c.lib are the dependencies.

In Visual Studio 6, once we specify these dependencies , after a.lib is
built, all the symbols in b.lib and c.lib are linked into a.lib
automatically. So in this case if I want to use a,b,c in another exe
(say myexe), I can just link to a.lib. In this case b.lib and c.lib will
automatically be linked into myexe

However in VS 2005, b.lib and c.lib are not automatically linked into
a.lib. So while building a.lib, we have to turn this parameter(Link
Library Dependencies) on. If this parameter is turned off and we try to
link a.lib with myexe, we get errors for all the symbols belonging to
b.lib and c.lib since they are not linked into a.lib.

Can anybody please help me on how to force b and c to link with a for Vstudio2005/2008  using cmake?


Thanks,
Hisham


      


More information about the CMake mailing list