[vtkusers] Fwd: VTK and GDCM building problem

Michael Xanadu xanadu.michael at googlemail.com
Thu Jan 16 07:17:05 EST 2014


For anyone who ever touches the same problem, here's the final solution.
Build "ALL_BUILD" in the GDCM solution, then integrate GDCM libs in your
CMakeLists.txt following way:

FIND_PACKAGE(GDCM REQUIRED)
    IF(GDCM_FOUND)
        INCLUDE(${GDCM_USE_FILE})
        SET(GDCM_LIBRARIES
            gdcmcharls
            gdcmCommon
            gdcmDICT
            gdcmDSED
            gdcmexpat
            gdcmgetopt
            gdcmIOD
            gdcmjpeg12
            gdcmjpeg16
            gdcmjpeg8
            gdcmMEXD
            gdcmMSFF
            gdcmopenjpeg
            gdcmzlib
            socketxx
            vtkgdcm
            Rpcrt4)
    ELSE(GDCM_FOUND)
        MESSAGE(FATAL_ERROR "Cannot find GDCM, did you set GDCM_DIR?")
    ENDIF(GDCM_FOUND)





---------- Forwarded message ----------
From: Michael Xanadu <xanadu.michael at googlemail.com>
Date: 2014/1/15
Subject: VTK and GDCM building problem
To: vtkusers at vtk.org


Hi friends,

I developed a project using CMake 2.8.12.1, Visual Studio 2010, GDCM 2.4.1
and VTK 5.6.0. I successfully compiled VTK and now I have a problem
concerning compiling GDCM with support of VTK. I need to enable
"GDCM_USE_VTK" in the CMake options of  GDCM. That option leads to a
compiler error when I try to build the "INSTALL" subproject in the GDCM
solution:

CMake Error at cmake_install.cmake:31 (FILE): file INSTALL cannot find
"D:/Libs/VTK_5.6.0/BIN/bin/vtkCommon.dll".

I took a look in the VTK directory and found out that the path mentioned
above does not exists. Instead the dll is located in:

D:\Libs\VTK_5.6.0\BIN\bin\Release\vtkCommon.dll or
D:\Libs\VTK_5.6.0\BIN\bin\Debug\vtkCommon.dll

That means GDCM solution does not know the dll is located in a special
debug or release folder. If I disable "GDCM_USE_VTK" everything works. But
I do need the VTK dll for GDCM.
Any thoughts?

Thank you,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140116/845039d2/attachment.html>


More information about the vtkusers mailing list