[Cmake] use a static library

imho imho at skynet.be
Thu Feb 27 08:58:59 EST 2003


thanks, but I still have problems.
I explain :
I work on a project who needs itk, vtk and qt.
We have something working on windows, and I try to compile it on linux, 
but we use Kuebler's vtk_qt  library,
so I need to build this for linux first.
That's what I've done (making a libvtk_qt.a ) but now I still have 
linking problems.

I've joined my cmakelists and error listing.

Thanks for helping




Andy Cedilnik wrote:

>Hi,
>
>If you want to create static library:
>
>ADD_LIBRARY(foo STATIC source.c source1.c...)
>
>If you want to link static library to your project:
>
>TARGET_LINK_LIBRARIES(bar foo)
>
>or 
>
>TARGET_LINK_LIBRARIES(bar /path/to/foo/libfoo.a)
>
>				Andy
>
>On Thu, 2003-02-27 at 06:59, imho wrote:
>  
>
>>Hi,
>>
>>How do I link a static .a library on linux with cmake?
>>
>>Thanks
>>
>>_______________________________________________
>>Cmake mailing list
>>Cmake at public.kitware.com
>>http://public.kitware.com/mailman/listinfo/cmake
>>    
>>
>
>
>
>
>
>
>  
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://public.kitware.com/pipermail/cmake/attachments/20030227/0127586f/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists-vtk_qt.txt
URL: <http://public.kitware.com/pipermail/cmake/attachments/20030227/0127586f/attachment-0001.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: link.errors
URL: <http://public.kitware.com/pipermail/cmake/attachments/20030227/0127586f/attachment.ksh>


More information about the CMake mailing list