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

André Prins a.h.prins at gmail.com
Wed Jul 21 10:57:33 EDT 2010


Hi Michael,

What Dave probably meant with was to explicitly specify a VTK_DIR
variable to the find_package command. E.g. something like this:

    set( VTK_DIR "c:\work\libs\vtk_bin_5.6.0_x64" )
    find_package( VTK REQUIRED )
    include( ${VTK_USE_FILE} )

Alternatively, you could specify a hint to find_package. E.g. in my
projects...,

    find_package( VTK REQUIRED HINTS $ENV{VTKDIR} )
    include( ${VTK_USE_FILE} )

I usually have severaly "batch-scripts or profiles" with my various
development-environments... E.g. a 32-bit Vtk Release Static and a
64-bit Vtk Debug Release, etc. This way I can use a single
CMakeLists.txt.

Regards,
Andre


On Wed, Jul 21, 2010 at 10:55 AM, Zack Galbreath
<zack.galbreath at kitware.com> wrote:
> On Wed7/2110 Wed Jul 21 10:45 AM, Michael Xanadu wrote:
>>
>> Hi Zack,
>>
>> there's no VTK_DIR row in my CMake GUI. That's my problem. ;-)
>>
>
> Strange...
>
> Here's some more things to try:
>
> *Double check that you have the right project loaded in CMake GUI.
> *Toggle to Advanced View instead of Simple View.  This option is to the
> right of the Search bar.
> *Try reloading the cache (file -> reload cache)
>
> Good luck!
>
> -Zack
> _______________________________________________
> 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