The answer is here:
http://www.cmake.org/pipermail/cmake/2008-December/025814.html
Is that the same thread you're referring to?
Hint:  use target_link_libraries instead of add_dependency.

Clint

Hisham Chowdhury wrote:
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


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to