[CMake] howto include libs ?

Michael Jackson mike.jackson at bluequartz.net
Sun Feb 15 13:59:29 EST 2009


Doh.. Sorry about that. Eric. Thanks for the pick up on that.

_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio



On Feb 15, 2009, at 1:29 PM, 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.
>
> -- 
> Erk



More information about the CMake mailing list