I've transitioned the patch from 'WIP' to 'ENH'

http://review.source.kitware.com/#/c/6643/

It isn't 100% done, but it would be good to get some other eyes on
it.

It now installs, and puts the header files and libraries in the correct
places.

The problem remains: If you try and link to an installed ITK, the DCMTK
libraries are not handled properly.

The ITKDCMTK.cmake module file looks to be about right, but when CMake
actually generates the link lists in CMakeFiles in the build directory, it
just uses -ldcmdata instead of giving the full library path the way it
does for the actual library targets that ITK builds.

So somehow I have to get CMake to understand that these imported libraries
-- which it can handle fine internally -- are in fact libraries, and need
to be treated the way other libraries are.


--
Kent Williams [email protected]






On 7/30/12 1:32 PM, "Brad King" <[email protected]> wrote:

>On 07/30/2012 02:12 PM, Williams, Norman K wrote:
>> This is kind of wacky, and once again I am being thwarted by doing
>> something never done before:
>>
>> I have the DCMTK install working almost 100%.  The not-working part: If
>> you build in ITK, the DCMTK libraries are added with ADD_LIBRARY(libname
>> STATIC imported).
>> Within an ITK build -- i.e. when the test program for ITKDCMTKImageIO is
>> built -- CMake is smart enough to replace the import library name (e.g.
>> ITKDCMTK_data) with the actual path of the library.
>>
>> But when the *.cmake files are created for an ITK install, they don't
>> distinguish between an imported library target and a local library
>>target.
>>  ITK_LIBRARIES contains the library's import name (e.g. ITKDCMTK_data)
>> instead of the actual library name (e.g. libdcmdata.a).
>
>We would need custom content in the ITKDCMTK.cmake module information
>file to provide the imported targets.  However, see next response.
>
>> I'm sure what this comes down to is changing how the ITK CMake files are
>> configured. The IMPORTED_LINK_INTERFACE_LIBRARIES property needs to be
>> checked.  But I don't know where exactly to do this.
>
>This can be set to hide DCMTK from the public interface altogether
>so that the imported targets are not referenced at all.  Just set
>the LINK_INTERFACE_LIBRARIES (without IMPORTED_ prefix) property
>of the corresponding targets in the CMakeLists.txt files.  CMake
>will propagate that to the target files in the install tree.
>
>-Brad



________________________________
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

Reply via email to