[Insight-users] Wrong include path to GDCM in installed itk-3.0
version?
Max Schoebinger
m.schoebinger at dkfz-heidelberg.de
Tue Dec 19 04:54:14 EST 2006
Hi Mathieu,
thank you for taking the time looking into the problem. I checked your
example, and could reproduce my problem with it. I suppose that your
build and original itk-source tree are still accessible. Here is what
you need to do to reproduce the problem:
1. copy an itk source tree to /tmp/InsightToolkit-3.0.0
2. create a directory /tmp/itk-3.0-build
3. configure the build in the directory /tmp/itk-3.0-build using cmake 2.4.4
4. set CMAKE_INSTALL_PREFIX to /opt/itk-3.0
5. build itk in the directory /tmp/itk-3.0-build
6. make install
Now compile your example. It works fine... Lets continue by removing the
temporary source and build directories:
1. mv /tmp/itk-3.0-build /tmp/itk-3.0-build-moved
2. mv /tmp/InsightToolkit-3.0.0 /tmp/InsightToolkit-3.0.0-moved
Now try to compile your example again. It won't work (at least in my
configuration). The file /opt/itk-3.0/lib/InsightToolkit/ITKConfig.cmake
contains wrong values in the variable ITK_INCLUDE_DIRS:
max at muck:~> grep gdcm /opt/itk-3.0/lib/InsightToolkit/ITKConfig.cmake
SET(ITK_INCLUDE_DIRS
"/opt/itk-3.0/include/InsightToolkit;/opt/itk-3.0/include/InsightToolkit/Algorithms;/opt/itk-3.0/include/InsightToolkit/BasicFilters;/opt/itk-3.0/include/InsightToolkit/Common;/opt/itk-3.0/include/InsightToolkit/expat;/opt/itk-3.0/include/InsightToolkit/Numerics;/opt/itk-3.0/include/InsightToolkit/IO;/opt/itk-3.0/include/InsightToolkit/Numerics/FEM;/opt/itk-3.0/include/InsightToolkit/Numerics/Statistics;/opt/itk-3.0/include/InsightToolkit/Numerics/NeuralNetworks;/opt/itk-3.0/include/InsightToolkit/SpatialObject;/opt/itk-3.0/include/InsightToolkit/Utilities/MetaIO;/opt/itk-3.0/include/InsightToolkit/Utilities/NrrdIO;/opt/itk-3.0/include/InsightToolkit/Utilities/DICOMParser;/opt/itk-3.0/include/InsightToolkit/Utilities;/opt/itk-3.0/include/InsightToolkit/Utilities/vxl/vcl;/opt/itk-3.0/include/InsightToolkit/Utilities/vxl/core;/tmp/itk-3.0-build/Utilities/gdcm;/tmp/InsightToolkit-3.0.0/Utilities/gdcm/src")
As you can see, the paths relevant for gdcm usage point to the temporary
directories in /tmp
I am using SuSE Linux 10.1 on a 64 bit computer, cmake 2.4.4, gcc-4.1
and itk 3.0. I have attatched CMakeCache.txt for the itk build and the
corresponding cmake files from the lib/InsightToolkit directory.
I hope that my problem can be reproduced...
Max
Mathieu Malaterre wrote:
> Max Schoebinger wrote:
>> Hello everyone,
>>
>> when compiling itk-3.0 on linux and installing it to a custom location
>> (/opt/itk-3.0 via make install), it seems that the path to the gdcm
>> include files is wrong in the installed ITKConfig.cmake. It points to
>> the directory where itk and gdcm were compiled
>> (/tmp/itk-3.0/Utilities/gdcm) and not where it is installed
>> (/opt/itk-3.0/include/InsightToolkit/gdcm). When the original
>> build-directory is removed, itk based projects won't compile anymore.
>>
>> I am using cmake 2.4.3. ITK_USE_SYSTEM_GDCM is set to OFF.
>>
>> I assume this is a bug, or am I missing something?
>
> Hi Max,
>
> Here is what I have been doing:
>
> $ cat CMakeLists.txt
>
> FIND_PACKAGE(ITK)
>
> INCLUDE(${USE_ITK_FILE})
>
> ADD_EXECUTABLE(dummy dummy.cxx)
> TARGET_LINK_LIBRARIES(dummy ITKIO)
>
>
> $ cat dummy.cxx
>
> #include "gdcmFile.h"
>
> int main()
> {
> gdcm::File *f = new gdcm::File();
> return 0;
> }
>
>
>
> And CMakeCache.txt is:
>
> $ grep ITK_DIR CMakeCache.txt
> ITK_DIR:PATH=/home/mathieu/local/lib/InsightToolkit
>
>
> This looks like it is working for me.
>
> HTH
> Mathieu
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
--
Dipl.-Inform. Med. Max Schöbinger
Deutsches Krebsforschungszentrum (German Cancer Research Center)
Div. Medical & Biological Informatics Tel: (+49) 6221-42 2370
Im Neuenheimer Feld 280 Fax: (+49) 6221-42 2345
D-69120 Heidelberg E-Mail: M.Schoebinger at dkfz.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake-files.tar.gz
Type: application/x-gzip
Size: 11488 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20061219/16964101/cmake-files.tar-0001.bin
More information about the Insight-users
mailing list