[vtkusers] Installing VTK 5.4.2 for VisualStudio2005

André Prins a.h.prins at gmail.com
Fri Apr 9 07:12:37 EDT 2010


Hi Dmitri,

You should call cmake and specify the CMAKE_INSTALL_PREFIX variable (I
believe it defaults to the Program Files folder with MSVC2005). After
building Vtk (by building the Vtk.sln solution-file) you should then
explicitly build the install project.

E.g., my own workflow when installing vtk looks like the following
(with the vtk source in C:\Development\Temp\Vtk_src_5.4.2) using a
temporary out-of-source build-dir
(C:\Development\Temp\Vtk_build_5.4.2):

    mkdir C:\Development\Temp\Vtk_build_5.4.2
    cd C:\Development\Temp\Vtk_build_5.4.2
    cmake -D"CMAKE_INSTALL_PREFIX:PATH=C:\Development\Vtk_5.4.2\"
C:\Development\Temp\Vtk_src_5.4.2
    deven Vtk.sln /build "Release|Win32"
    vcbuild Vtk.sln /project Install /build "Release|Win32"

When including Vtk in your own projects, you can then use CMake's
find_package and it will try to find the installed location. If
necessary you can specify a hint to find_package:

    find_package( Vtk HINTS "C:/Development/Vtk_5.4.2/lib/vtk-5.4" ).

I hope this helps,

Regards,
André

On Thu, Apr 8, 2010 at 2:24 PM, John Drescher <drescherjm at gmail.com> wrote:
>> I have generated VTK542 using cmake and cmake does create a new folder with stuff inside, but this folder differs from what I meant. In that folder there are:
>>
>> - Cmake
>> - CmakeFiles
>> - CmakeTmp
>> - Common
>> - Filtering
>> - GenericFIltering
>> - Geovis
>> - Graphics
>> - Hybrid
>> ... and so on
>>
>> what I was expecting to have is a folder with only:
>>
>>  - bin
>>  - include
>>  - lib
>>
>> inside, so that I can reference the "bin" folder into my VS2005 project and start programming with VTK. I can't find that "bin" folder in the data Cmake created. Do I have to do something else so that that "bin" and "lib" folders are created?
>>
>
> There is no automatic way to generate the vtk in the way you want. It
> is assumed that users of vtk will use CMake for their own projects. If
> you do not want to do that (I can understand it is a lot of work
> learning a new process) you will have to adjust your program for the
> new structure or to manipulate the files so that they are in the
> directory structure you desire.
>
> 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