[Insight-users] how to include a library?

Luis Ibanez luis.ibanez@kitware.com
Thu, 01 May 2003 14:05:18 -0400


Hi Aloys


Just add the following line to your
CMakeLists.txt file

   TARGET_LINK_LIBRARIES(myExecutable myLibrary)

in your case

   TARGET_LINK_LIBRARIES(myExecutable   nrutils  )

It is quite likely that your CMakeLists.txt
file already has a TARGET_LINK_LIBRARIES
command, in which case, you just add the
name of your library to the list.

The basic structure of this CMake command is:

   TARGET_LINK_LIBRARIES( executable lib1 lib2 lib3 ... libN)

It will probably end up being something like

   TARGET_LINK_LIBRARIES(myExecutable ITKCommon ITKIO nrutils )


Regards


   Luis



-------------------------

duboisda@tele.ucl.ac.be wrote:
>  Hi,
> 
>      I want to link Itk and a static library we created. We have some
> files .c compiled in .o and we created a .a file named libnrutils.a .
> What have I to do in the CMake file to use this library in my
> project?
> 
>            thanks for your help,
> 
>       aloys
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>