[Insight-developers] ITK4 Install dropping gdcm headers the wrong place?

Williams, Norman K norman-k-williams at uiowa.edu
Fri Feb 18 10:56:28 EST 2011


What went wrong is this:
The include files went to ${CMAKE_INSTALL_PREFIX}/include/gdcm-2.0, the
libraries
went to ${CMAKE_INSTALL_PREFIX}/lib.

Those aren't places that get configured into the installed
ITKConfig.cmake, so anything that uses gdcm via installed ITK4 will fail.

How this all gets put together has to do with the macros in
itkThirdParty.cmake --
it looks like for each 3rd party library in Utilities theres

1. ITK_THIRD_PARTY_OPTION(PACKAGE package) -- this declares the
USE_SYSTEM_<package>
stuff.
2. In itkIncludeDirectories.cmake ITK_THIRD_PARTY_INCLUDE(packagename)
sets up the include directories.
3. In utilites CMakeLists.xt ITK_THIRD_PARTY_SUBDIR(PACKAGE package)

It appears that GDCM has #3, but is missing #1 or #2.

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