[Insight-developers] Change in ITK[master]: COMP: Remove DCMTK from default modules

Matt McCormick matt.mccormick at kitware.com
Thu Nov 29 10:41:54 EST 2012


CC'ing Brad K, insight-developers for records.

On Thu, Nov 29, 2012 at 3:18 PM, Williams, Norman K
<norman-k-williams at uiowa.edu> wrote:
> Brad King came up with this.  Not to pass the buck on the issue…
>
> What it is trying to do is import the libraries, and then set the actual
> file location as a property on the imported library. The problem is that the
> libraries — during the ITK build — are not targets with respect to the ITK
> build system, they are created by the ExternalProject.  So they need to be
> imported to be used, and to be used, the IMPORTED_LOCATION property needs to
> be set.
>
> When you install ITK (and indeed, when you're using a build tree in place)
> you need to do two things:
>
> Install the libraries created by the ExternalProject
> Make an entry in the lib/cmake/ITK4.3/Modues directory
>
> In order for that to happen, the ${module_name}_EXPORT_CODE_BUILD and
> ${module_name}_EXPORT_CODE_INSTALL need to be defined.  These are used in
> itk_module_impl.
>
> I've tested simple programs linking against the build and install ITK
> directories.  If there's a problem with SITK using DCMTK libs, we need to
> figure out what the problem is and fix it.  SITK shouldn't care how the
> libraries were created, configured, and installed.
>
>     set(ITKDCMTK_EXPORT_CODE_BUILD "
> foreach(lib ${_ITKDCMTK_LIB_NAMES})
>   if(NOT TARGET \${lib})
>     add_library(\${lib} ${_ITKDCMTK_LIB_LINKAGE} IMPORTED)
>     set_property(TARGET \${lib} PROPERTY IMPORTED_LOCATION
>       \"${lib_dir}/${lib_prefix}\${lib}${lib_suffix}\")
>   endif()
> endforeach()
> ")
>
>
>
>
> On 11/29/12 8:57 AM, "Bradley Lowekamp" <blowekamp at mail.nih.gov> wrote:
>
> Kent,
>
> It looks like what I am encountering is the results of using cmake
> properties instead of full paths or library paths. This appears to be done
> here:
>
> https://github.com/Kitware/ITK/blob/master/Modules/ThirdParty/DCMTK/CMakeLists.txt#L130
>
> Why was this approach chosen?
>
> Brad
>
> On Nov 29, 2012, at 9:37 AM, "Williams, Norman K"
> <norman-k-williams at uiowa.edu> wrote:
>
> Between Brad King & I we went to some trouble to verify that you could use
> DCMTK in a program referencing an installed ITK with DCMTK.
> The libraries from DCMTK are imported in CMake, and the include directory
> is properly added to the include directory list.
> When this patch is merged, please log a task in Jira and assign it to me
> and I will investigate.
> --
> Kent Williams norman-k-williams at uiowa.edu
> On 11/29/12 7:32 AM, "Bradley Lowekamp (Code Review)" <review at kitware.com>
> wrote:
>
> Bradley Lowekamp has posted comments on this change.
> Change subject: COMP: Remove DCMTK from default modules
> ......................................................................
> Patch Set 1:
> Can we merge this patch yet?
> I looked into the issue SimpleITK was having with the installation of
> DCMTK. I don't think the installed cmake scripts has the right
> information so that projects which use ITK can include or link with
> DCMTK. Has any one else had this issue?
> --
> To view, visit http://review.source.kitware.com/8660
> To unsubscribe, visit http://review.source.kitware.com/settings
> Gerrit-MessageType: comment
> Gerrit-Change-Id: Ib979461a049e2bf0ca32b07db22decc3203f7e24
> Gerrit-PatchSet: 1
> Gerrit-Project: ITK
> Gerrit-Branch: master
> Gerrit-Owner: Bill Lorensen <bill.lorensen at gmail.com>
> Gerrit-Reviewer: Bill Lorensen <bill.lorensen at gmail.com>
> Gerrit-Reviewer: Bradley Lowekamp <blowekamp at mail.nih.gov>
> Gerrit-Reviewer: Hans J. Johnson <hans-johnson at uiowa.edu>
> Gerrit-Reviewer: Matt McCormick <matt.mccormick at kitware.com>
> Gerrit-Reviewer: kent williams <norman-k-williams at uiowa.edu>
>
> ________________________________
> 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.
> ________________________________
>
>
>
>
>
> ________________________________
> 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