CC'ing Brad K, insight-developers for records. On Thu, Nov 29, 2012 at 3:18 PM, Williams, Norman K <[email protected]> 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" <[email protected]> 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" > <[email protected]> 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 [email protected] > On 11/29/12 7:32 AM, "Bradley Lowekamp (Code Review)" <[email protected]> > 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 <[email protected]> > Gerrit-Reviewer: Bill Lorensen <[email protected]> > Gerrit-Reviewer: Bradley Lowekamp <[email protected]> > Gerrit-Reviewer: Hans J. Johnson <[email protected]> > Gerrit-Reviewer: Matt McCormick <[email protected]> > Gerrit-Reviewer: kent williams <[email protected]> > > ________________________________ > 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. > ________________________________ _______________________________________________ Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://www.itk.org/mailman/listinfo/insight-developers
