[Insight-users] Wrong include path to GDCM in installed itk-3.0
version?
Mathieu Malaterre
mathieu.malaterre at kitware.com
Mon Dec 18 15:54:58 EST 2006
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
More information about the Insight-users
mailing list