[CMake] Question about static library linking
Jonathan Fillion
jfillion at gallium.com
Mon Feb 2 14:36:55 EST 2009
Hi all,
We're trying to setup cmake to compile our libaries over here and I have
a simple question that I can't seem to find the answer to.
I have a dynamic library A that depends on a static library B which in
turns needs another static library C. Now,
in B's CMakeList.txt:
LINK_DIRECTORIES(/path/to/c)
TARGET_LINK_LIBRARIES(C)
in A's CMakeList.txt:
LINK_DIRECTORIES(/path/to/b)
TARGET_LINK_LIBRARIES(B)
When I try to compile A, it does try to link with C (ie, I see '-lC'
when I put CMake in verbose mode), so it tracks the dependency, but
unfortunately it does not put C's link path (ie, it misses the
-L/path/to/c).
Note that 'C' is an external library (libjpeg in this case...).
What am I doing wrong?
Cheers
Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090202/3043ca12/attachment.htm>
More information about the CMake
mailing list