[Insight-developers] ITK/GDCM install fail still a problem

Williams, Norman K norman-k-williams at uiowa.edu
Tue Mar 1 17:07:09 EST 2011


I just tried again to use an installed build and ran into the exact same
problem: gdcm headers get installed in
${CMAKE_INSTALL_PREFIX}/include/gdcm-2.0. When the ITKConfig.cmake for an
installation is written, it thinks they get installed in
${CMAKE_INSTALL_PREFIX}/InsightToolkit-4.0/gdcm.

I think that this is pretty much totally wrong; gdcm headers should be
installed in ${CMAKE_INSTALL_PREFIX}/include/InsightToolkit-4.0/gdcm ; and
for that matter the libraries should be in
${CMAKE_INSTALL_PREFIX}/lib/InsightToolkit.

Otherwise there is potential for libraries to over-write system libraries.

On 2/18/11 8:58 AM, "Mathieu Malaterre" <mathieu.malaterre at gmail.com>
wrote:

>Kent,
>
>  Thanks for the report.
>  Technically since GDCM is simply just a CMake 'project', it's
>installation should be identical to what happen when you download
>GDCM, install it, download ITK, configure with itk_use_system_gdcm and
>then install it.
>
>  I'll check with the CMake guru to see what I did wrong when
>declaring GDCM as a subproject of ITK.
>
>Thanks
>
>On Thu, Feb 17, 2011 at 9:31 PM, Bill Lorensen <bill.lorensen at gmail.com>
>wrote:
>> Kent,
>>
>> I agree that the install stuff in itk is very complicated. There must
>> be a better way.
>>
>> Can a cmake guru help us out?
>>
>> Bill
>>
>> On Thu, Feb 17, 2011 at 3:21 PM, Williams, Norman K
>> <norman-k-williams at uiowa.edu> wrote:
>>> The following patch half-fixes GDCM Install, though it seems to want to
>>> put everything in
>>>${CMAKE_INSTALL_PREFIX}/include/InsightToolkit-4.0/gdcm,
>>> whereas it used to put things in several subdirectories inside gdcm.
>>>
>>> There's a bunch of complicated stuff in the CMake files that I don't
>>> understand. I do understand that in the case of gdcm, it's broken.
>>>
>>> diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt
>>> index 9f3e810..0a0ea31 100644
>>> --- a/Utilities/CMakeLists.txt
>>> +++ b/Utilities/CMakeLists.txt
>>> @@ -56,6 +56,8 @@ set(GDCM_TARGETS_NAME ITKTargets)
>>>  set(GDCM_BUILD_TESTING_DEFAULT OFF)
>>>  set(GDCM_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS} CACHE BOOL "" FORCE)
>>>  set(GDCM_USE_SYSTEM_EXPAT ON CACHE BOOL "" FORCE)
>>> +set(GDCM_INSTALL_INCLUDE_DIR
>>> ${CMAKE_INSTALL_PREFIX}/${ITK_INSTALL_INCLUDE_DIR}/gdcm)
>>> +set(GDCM_INSTALL_LIB_DIR
>>>${CMAKE_INSTALL_PREFIX}/${ITK_INSTALL_LIB_DIR})
>>>  # ITKEXPAT can not be a system one:
>>>  set(EXPAT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/expat" CACHE PATH
>>>""
>>> FORCE)
>>>  set(EXPAT_LIBRARY ITKEXPAT CACHE FILEPATH "" FORCE)
>>> diff --git a/itkIncludeDirectories.cmake b/itkIncludeDirectories.cmake
>>> index f6c0e51..22aea3a 100644
>>> --- a/itkIncludeDirectories.cmake
>>> +++ b/itkIncludeDirectories.cmake
>>> @@ -168,10 +168,11 @@ endif(NOT ITK_USE_SYSTEM_VXL)
>>>
>>>  if(NOT ITK_USE_SYSTEM_GDCM)
>>>   set(ITK_INCLUDE_RELATIVE_DIRS ${ITK_INCLUDE_RELATIVE_DIRS}
>>> -    gdcm/Source/Common
>>> -    gdcm/Source/DataStructureAndEncodingDefinition
>>> -    gdcm/Source/MediaStorageAndFileFormat
>>> -    gdcm/Source/DataDictionary
>>> +    # gdcm/Source/Common
>>> +    # gdcm/Source/DataStructureAndEncodingDefinition
>>> +    # gdcm/Source/MediaStorageAndFileFormat
>>> +    # gdcm/Source/DataDictionary
>>> +    gdcm
>>>     )
>>>  endif(NOT ITK_USE_SYSTEM_GDCM)
>>>
>>>
>>>
>>>
>>> ________________________________
>>> Notice: This UI Health Care e-mail (including attachments) is covered
>>>by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is
>>>confidential and may be legally privileged.  If you are not the
>>>intended recipient, you are hereby notified that any retention,
>>>dissemination, distribution, or copying of this communication is
>>>strictly prohibited.  Please reply to the sender that you have received
>>>the message in error, then delete it.  Thank you.
>>> ________________________________
>>>
>>
>
>
>
>--
>Mathieu



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________


More information about the Insight-developers mailing list