[ITK] ITK not maintaining the “optimized” and “debug” qualifiers for the DCMTK libraries.

Carol Johnson carjohnson at gmail.com
Tue Jul 15 10:55:39 EDT 2014


Hi All


When building my VS projects which link in ITK, I was finding both Debug
and Release versions of the DCMTK libraries in the list of additional
dependencies.


When integrating DCMTK into ITK, I did an external build of DCMTK in both
the Debug and Release configurations. The build for ITK picks up these
libraries and stores them in the variable ITKDCMTK_LIBRARIES (defined in
the ITKDCMTK.cmake file). Each of the 15 DCMTK libraries is listed preceded
by the “optimized;” and “debug;” qualifiers. (See below).



This list gets added to the ITK_LIBRARIES variable and when the macro
“itk_module_config” (in ITKModuleAPI.cmake) is called it does a
“REMOVE_DUPLICATES”. Since “optimized” and “debug” are repeated several
times in the list, only the first instance of each is kept.


As a temporary workaround so that I don’t have to remove the unwanted
libraries each time I have to rebuild my projects, I modified the
ITKModuleAPI.cmake at line 70 to not include LIBRARIES when removing
duplicates and rebuilt ITK.

                #  foreach(v ${ns}_LIBRARIES ${ns}_INCLUDE_DIRS
${ns}_LIBRARY_DIRS)

                  foreach(v ${ns}_INCLUDE_DIRS ${ns}_LIBRARY_DIRS)



Unfortunately, this applies to the entire ITK library list - not just the
DCMTK .


Does anyone have a better solution, or can you tell me the implications on
the ITK system as a whole having done this?


NB. I am using Visual Studio 2012, CMake 2.8.10, on a Windows 7 platform.

ITKDCMTK_LIBRARIES variable from ITKDCMTK.cmake :


set(ITKDCMTK_LIBRARIES "*optimized*;D:/DicomToolkit/Binary/dcmpstat/libsrc/
Release/dcmpstat.lib;*debug*;D:/DicomToolkit/Binary/dcmpstat/
libsrc/Debug/dcmpstat.lib;*optimized*;D:/DicomToolkit/Binary/
dcmsr/libsrc/Release/dcmsr.lib;*debug*;D:/DicomToolkit/
Binary/dcmsr/libsrc/Debug/dcmsr.lib;*optimized*;D:/
DicomToolkit/Binary/dcmsign/libsrc/Release/dcmdsig.lib;*debug*
;D:/DicomToolkit/Binary/dcmsign/libsrc/Debug/dcmdsig.lib;*optimized*
;D:/DicomToolkit/Binary/dcmtls/libsrc/Release/dcmtls.lib;*debug*;D:/
DicomToolkit/Binary/dcmtls/libsrc/Debug/dcmtls.lib;*optimized*
;D:/DicomToolkit/Binary/dcmqrdb/libsrc/Release/dcmqrdb.lib;*debug*;D:/
DicomToolkit/Binary/dcmqrdb/libsrc/Debug/dcmqrdb.lib;*optimized*
;D:/DicomToolkit/Binary/dcmnet/libsrc/Release/dcmnet.lib;*debug*
;D:/DicomToolkit/Binary/dcmnet/libsrc/Debug/dcmnet.lib;*optimized*;D:/
DicomToolkit/Binary/dcmjpeg/libsrc/Release/dcmjpeg.lib;*debug*
;D:/DicomToolkit/Binary/dcmjpeg/libsrc/Debug/dcmjpeg.lib;*optimized*
;D:/DicomToolkit/Binary/dcmimage/libsrc/Release/dcmimage.lib;*debug*;D:/
DicomToolkit/Binary/dcmimage/libsrc/Debug/dcmimage.lib;*optimized*
;D:/DicomToolkit/Binary/dcmimgle/libsrc/Release/dcmimgle.lib;*debug*;D:/
DicomToolkit/Binary/dcmimgle/libsrc/Debug/dcmimgle.lib;*optimized*
;D:/DicomToolkit/Binary/dcmdata/libsrc/Release/dcmdata.lib;*debug*;D:/
DicomToolkit/Binary/dcmdata/libsrc/Debug/dcmdata.lib;*optimized*
;D:/DicomToolkit/Binary/oflog/libsrc/Release/oflog.lib;*debug*
;D:/DicomToolkit/Binary/oflog/libsrc/Debug/oflog.lib;*optimized*;D:/
DicomToolkit/Binary/ofstd/libsrc/Release/ofstd.lib;*debug*
;D:/DicomToolkit/Binary/ofstd/libsrc/Debug/ofstd.lib;*optimized*
;D:/DicomToolkit/Binary/dcmjpeg/libijg12/Release/ijg12.lib;*debug*;D:/
DicomToolkit/Binary/dcmjpeg/libijg12/Debug/ijg12.lib;*optimized*
;D:/DicomToolkit/Binary/dcmjpeg/libijg16/Release/ijg16.lib;*debug*;D:/
DicomToolkit/Binary/dcmjpeg/libijg16/Debug/ijg16.lib;*optimized*
;D:/DicomToolkit/Binary/dcmjpeg/libijg8/Release/ijg8.lib;*debug*
;D:/DicomToolkit/Binary/dcmjpeg/libijg8/Debug/ijg8.lib;netapi32;wsock32")



Regards

Carol Johnson

<carjohnson at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140715/1b58f34c/attachment-0001.html>


More information about the Community mailing list