[vtkusers] config kwsys for use in vtk app?
Dean Inglis
dean.inglis at camris.ca
Thu Jan 18 11:32:52 EST 2007
Thanks David,
works like a charm.
Dean
Hi Dean,
I don't think you have to do anything in your CMakeLists.txt file at all.
Just remember to call it as "vtksys" within your code. E.g.:
#include "vtksys/SystemTools.hxx"
vtksys::SystemTools::SplitPath(this->FileName, filePath);
The vtksys library will automatically be linked since it is a dependency
of the other VTK libraries. If you want, you can make the linkage
explicit by adding vtksys to your TARGET_LINK_LIBRARIES.
- David
> how can I incorporate kwsys functionality
> in a simple command line VTK app? For
> example, my CMakeLists.txt file contains:
>
> PROJECT(Surf)
>
> INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
> IF (USE_VTK_FILE)
> INCLUDE(${USE_VTK_FILE})
> ENDIF (USE_VTK_FILE)
>
> ADD_EXECUTABLE(TestSurf TestSurf.cxx)
> TARGET_LINK_LIBRARIES(TestSurf vtkCommon vtkGraphics vtkFiltering
vtkRendering)
>
> and within TestSurf.cxx I want to use
> a kwsys string utility defined in SystemTools.hxx
>
> Dean
More information about the vtkusers
mailing list