You shouldn't need to set a VTK_DIR environment variable. Also you can simplify your logic slightly by using FIND_PACKAGE(VTK REQUIRED) instead.<div><br></div><div> That said, the only thing you should have to do is set VTK_DIR in the cmake gui to <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">C:\WORK\LIBS\VTK_BIN_5.6.0_x64 and that should be it. Are there definately VTKConfig.cmake and UseVTK.cmake files in the root of your build directory?</span><br>
<br><div class="gmail_quote">On Wed, Jul 21, 2010 at 7:32 AM, Michael Xanadu <span dir="ltr"><<a href="mailto:xanadu.michael@googlemail.com">xanadu.michael@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>I built two different VTK binaries with the same source (using CMake) - one 32bit, the other one 64bit. For example:<br><br>C:\WORK\LIBS\VTK_SRC_5.6.0<br>C:\WORK\LIBS\VTK_BIN_5.6.0_x32<br>C:\WORK\LIBS\VTK_BIN_5.6.0_x64<br>
<br>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.<br>
The question is: How can I specify the path to VTK binaries in CMake (for my own)?<br>Here's the part of my CMakeLists.txt so far:<br><br><br>FIND_PACKAGE(VTK)<br>IF(NOT VTK_DIR)<br> MESSAGE(FATAL_ERROR "Please set VTK_DIR.")<br>
ENDIF(NOT VTK_DIR)<br>INCLUDE(${VTK_USE_FILE})<br>SET( VTK_LIBRARIES<br> ${VTK_LIBRARIES}<br> vtkHybrid<br> vtkVolumeRendering<br> vtkRendering<br> QVTK<br>)<br>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>