[CMake] Simple (?) lib linking question
Jorge Rodriguez
jrodriguez at xvt.com
Thu Aug 3 17:27:08 EDT 2006
Anders Sundman wrote:
> /usr/bin/libtool: can't locate file for: -llibb
> /usr/bin/libtool: file: -llibb is not an object file (not allowed in a
> library)
>
I see the problem:
ADD_LIBRARY(liba SHARED liba.cpp)
...
TARGET_LINK_LIBRARIES(liba libb)
CMake handles the "lib" part for you. This should look more like:
ADD_LIBRARY(a SHARED liba.cpp)
...
TARGET_LINK_LIBRARIES(a b)
CMake will generate "liba.dylib" and "libb.a" and such.
--
Jorge Rodriguez
XVT Software Development
Email: jrodriguez at xvt.com
Phone: (919) 854-1800 x222
More information about the CMake
mailing list