[CMake] How to add the library?

William A. Hoffman billlist at nycap.rr.com
Thu Feb 16 09:56:07 EST 2006


At 07:58 AM 2/16/2006, =?gb2312?b?zfXn9w==?= wrote:
>Hello,
>  I want to creat my project with both itk and vtk.
>  My CMakelists is as follows:
>  PROJECT(myProject)
>FIND_PACKAGE ( ITK)
>IF ( ITK_FOUND)
>INCLUDE( ${USE_ITK_FILE} )
>ENDIF( ITK_FOUND)
>FIND_PACKAGE ( VTK)
>IF ( VTK_FOUND)
>INCLUDE( ${USE_VTK_FILE} )
>ENDIF( VTK_FOUND)
>INCLUDE_DIRECTORIES(
>${myProject_SOURCE_DIR}
>)
>INCLUDE_DIRECTORIES(
>${ITK_SOURCE_DIR}/Code/Commom
>)
>
>ADD_EXECUTABLE( myProject myProject.cxx)
>TARGET_LINK_LIBRARIES ( myProject
>ITKBasicFilters ITKCommon ITKIO
>vtkRendering vtkGraphics vtkHybrid
>vtkImaging vtkIO vtkFiltering vtkCommon
>)
>
>  I create a new clean directory, but it cann't find all the libs. How can I add the libraries? 
>  Thanks.
You need to describe your problem in more detail, the cmake file looks good,
but you may be missing libraries that your program uses.  Exactly what error
messages are you getting?

-Bill




More information about the CMake mailing list