[vtkusers] How to specify the path to VTK in CMake?

André Prins a.h.prins at gmail.com
Thu Jul 22 09:13:50 EDT 2010


Dear Michael,

Would it work if you "explicitly" specified the correct
link-directories and include-directories? Thus, without using a
find-package and without the VTK_USE_FILE?

link_directories( <your vtkdir>\lib\vtk-5.6 )
include_directories( <your vtkdir>\include\vtk-5.6>

And then the ordinary

target_link_libraries( <your app> vtkRendering vtkFiltering vtkCommon )

I know this is definitely not the recommended way to do it, but I have
used it sometimes in the past and when you are certain of the correct
compiler-settings it should work.

Regards,
Andre



On Thu, Jul 22, 2010 at 8:51 AM, John Drescher <drescherjm at gmail.com> wrote:
>> thank you all very much for your support. I tried all you suggestions, but
>> no one works. Finally, I'm about to surrender... :-( May I ask you guys one
>> more question?
>> Does the CMake GUI show a "VTK_DIR" row in your projects BY DEFAULT?
>>
>
> Yes. This has always worked for the 2+ years I have used Cmake on
> windows (and Cmake 2.4.X to Cmake-2.8.2). Attached is a screen capture
> of the SideBySideRenderWindows example from the vtk wiki examples. You
> can find the example at
> http://www.cmake.org/Wiki/VTK/Examples/Qt/SideBySideRenderWindows#CMakeLists.txt
>
> Note although it always shows a VTK_DIR on the first run cmake-gui can
> not always locate the correct VTK_DIR for me under windows. One
> reason is I install everything under X: instead of cluttering my OS
> drive. As a result the first time I configure a new project or delete
> the cache I need to manually set this variable.
>
> John
>
> _______________________________________________
> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list