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

Cyrille Faucheux cyrille.faucheux at etu.univ-tours.fr
Wed Jul 21 08:12:05 EDT 2010


You need to regenerate your build process (makefile, visual studio 
solution, whatever...).
Rerun CMake, set the VTK_DIR option to the x64 path of your VTK 
binaries, reconfigure and regenerate. You now must be able to recompile 
you app and link with the x64 libs.

Cyrille

Le 21/07/2010 13:32, Michael Xanadu a écrit :
> Hi,
> I built two different VTK binaries with the same source (using CMake) 
> - one 32bit, the other one 64bit. For example:
>
> C:\WORK\LIBS\VTK_SRC_5.6.0
> C:\WORK\LIBS\VTK_BIN_5.6.0_x32
> C:\WORK\LIBS\VTK_BIN_5.6.0_x64
>
> Then I built my own application with linking 32bit-version of VTK 
> successfully. But now I want to build another application with linking 
> 64bit-version. But that fails because CMake always links the 
> 32bit-version?! I messed around with the CMakeLists.txt, VTK_DIR 
> environment variable, FindVTK.cmake and so on - without success.
> The question is: How can I specify the path to VTK binaries in CMake 
> (for my own)?
> Here's the part of my CMakeLists.txt so far:
>
>
> FIND_PACKAGE(VTK)
> IF(NOT VTK_DIR)
>   MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
> ENDIF(NOT VTK_DIR)
> INCLUDE(${VTK_USE_FILE})
> SET( VTK_LIBRARIES
>   ${VTK_LIBRARIES}
>   vtkHybrid
>   vtkVolumeRendering
>   vtkRendering
>   QVTK
> )
>
>
> _______________________________________________
> 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
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100721/857ceea8/attachment.htm>


More information about the vtkusers mailing list