[CMake] howto include libs ?

Reinhard Thies Reinhard.Thies at web.de
Sun Feb 15 13:40:29 EST 2009


Thanks,

it works beautifull now ;-)

Reinhard

On Sunday, 15. February 2009 19:29:17 Eric Noulard wrote:
> 2009/2/15 Reinhard Thies <Reinhard.Thies at web.de>:
> > Thanks,
> >
> > it helped, but now I get :
> >
> > Linking C executable ds309
> > /usr/bin/ld: cannot find -llibconfuse
> > collect2: ld returned 1 exit status
> >
> > and the lib is defenetly there. I assume it is not cmake related but do
> > you still have an idea ?
>
> I assume you are compiling on a Unix type host (may be linux)
> then you should not add the "lib" prefix to you library.
>
> thus you should not write:
>
> TARGET_LINK_LIBRARIES(ds309 libconfuse)
>
> but you should instead write:
>
> TARGET_LINK_LIBRARIES(ds309 confuse)
>
> this will end-up with a "-lconfuse"
> which should work on most Unix platform.




More information about the CMake mailing list