[CMake] Trouble with interdependent libraries

Joseph Garvin k04jg02 at gmail.com
Tue Nov 27 15:44:32 EST 2007


I'm working with 3 CMakeLists.txt files I didn't write, so I'm trying to
figure out the reasoning behind them.

-Application A has a CMakeLists.txt file with TARGET_LINK_LIBARIES(LibB,
LibC).
-LibB and LibC each have their own subfolders and CMakeLists.txt file, and
use ADD_LIBRARY to declare their sources to be a library.
-LibB uses some classes defined in LibC.

Under windows, I can run cmake, compile and link without errors. On Linux, I
get linker errors that LibB's uses of LibC are undefined references. I tried
adding TARGET_LINK_LIBRARY(LibC) to LibB's CMakeLists.txt file, but that
didn't fix the error. Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20071127/990364d5/attachment.html


More information about the CMake mailing list