[CMake] Static library issues.
Eric Noulard
eric.noulard at gmail.com
Fri Feb 5 09:11:09 EST 2010
2010/2/5 Surya Kiran Gullapalli <suryakiran.gullapalli at gmail.com>:
> Hello all,
> I'm using CMake-2.8 on winxp with Visual Studio 2005 generator.
> lets say I've a dll created (A.dll) from some cxx files and a static library
> static.lib
> So I call Link_Directories to specify the directory where the static library
> is located.
Why don't you use
target_link_libraries(A /full/path/to/static.lib)
> Now A.dll is built fine.
> Now I want B.dll built from some cxx sources, A.lib (the import lib of
> A.dll)
> Now when I say Target_Link_Libraries for (B A), the project file is created
> with static.lib also as a dependency.
> Now B has two dependencies A and static.lib. But I'm not adding the
> directory of static.lib to Link_Directories for B and my build fails.
> I do not think B needs to know about static.lib
> Any Ideas how to avoid this ?
I think you shoudl stay away from link_directories usage.
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
More information about the CMake
mailing list