Hi,
I developed an application, which has many CMakeList,  based on VTK. One of 
CMakelist files is like the
following,

#FIND_PACKAGE(VTK REQUIRED)
#INCLUDE(${VTK_USE_FILE})

...

  TARGET_LINK_LIBRARIES(TetrahedrisationNG
    Basics
    Graphics2DNG
    Graphics3DNG
    vtkIO
    vtkCommon
        )

The error is
/usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../x86_64-suse-linux/bin/ld:
cannot find -lvtkIO

However, I can successfully make vtk example using the following CMakeList.

PROJECT (BlockMatchingGPU)

FIND_PACKAGE(VTK REQUIRED)
IF(NOT VTK_USE_RENDERING)
  MESSAGE(FATAL_ERROR "Example ${PROJECT_NAME} requires VTK_USE_RENDERING.")
ENDIF(NOT VTK_USE_RENDERING)
INCLUDE(${VTK_USE_FILE})


FIND_PACKAGE (ITK)
IF (ITK_FOUND)
INCLUDE(${USE_ITK_FILE} )
ENDIF(ITK_FOUND)


ADD_EXECUTABLE(BlockMatchingGPU BlockMatchingGPU.cxx)


TARGET_LINK_LIBRARIES(BlockMatchingGPU ITKBasicFilters ITKCommon ITKIO 
vtkRendering vtkGraphics vtkHybrid vtkImaging vtkIO vtkFiltering vtkCommon)

The application has many CMakeList. I don't know whether I add FIND_PACKAGE
into the correct CMakeList.

Thanks.

Yixun

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to