View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014164CMakeCMakepublic2013-05-22 13:252016-06-10 14:31
ReporterStefan Roettger 
Assigned ToMathieu Malaterre 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformApple MacOSOS XOS Version10.4.10
Product VersionCMake 2.8.11 
Target VersionFixed in Version 
Summary0014164: missing library in cmake-2.8/Modules/FindDCMTK.cmake
DescriptionThe FindDCMTK module finds various libs as part of DCTMK. The module finds all those in a for loop:

foreach(lib
    dcmdata
    dcmimage
    dcmimgle
    dcmjpeg
    dcmnet
    dcmpstat
    dcmqrdb
    dcmsign
    dcmsr
    dcmtls
    ijg12
    ijg16
    ijg8
    ofstd)

This loop is missing the "oflog" lib. oflog depends on ofstd, so it should read:

foreach(lib
    dcmdata
    dcmimage
    dcmimgle
    dcmjpeg
    dcmnet
    dcmpstat
    dcmqrdb
    dcmsign
    dcmsr
    dcmtls
    ijg12
    ijg16
    ijg8
    oflog
    ofstd)
Steps To Reproducelinkage against dcmtk 3.6.0 fails.
Additional InformationAn example project that depends on dcmtk is available at http://code.google.com/p/vvv/source/browse/#svn%2Fviewer%2Fqtv3 [^]

This one works because I added the linkage with dcmtk manually. I mean, adding -loflog to the linker line manually solves the problem.

Using find_package(DCMTK) and linking against DCMTK_LIBRARIES does result in unresolved symbols because oflog is not part of DCMTK_LIBRARIES (yet ;-).
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0033112)
Jean-Christophe Fillion-Robin (reporter)
2013-05-22 13:39

For reference: An updated version of the FindDCMTK.cmake module is available here: https://github.com/commontk/CTK/blob/master/Utilities/CMake/FindDCMTK.cmake [^]

It has been updated to be able to find the library associated with the latest version of DCMTK. Not DCMKT has been CMake'ified, it is also able to find libraries associated with a build or install tree of DCMTK.

I am sure it would be helpful if you could check that this updated module works within your application.
(0033113)
Brad King (manager)
2013-05-22 13:45

Assigned to Mathieu, current FindDCMTK maintainer:

 http://www.cmake.org/Wiki/CMake:Module_Maintainers [^]

Fortunately upstream DCMTK is learning to provide a CMake package configuration file:

 http://git.dcmtk.org/web?p=dcmtk.git;a=commitdiff;h=06c91303 [^]

after which "find_package(DCMTK NO_MODULE)" will work without any find module.
(0033114)
Jean-Christophe Fillion-Robin (reporter)
2013-05-22 15:23

And they should be integrating soon the following commit :) https://github.com/commontk/DCMTK/commit/f461865d1759854db56e4c840991c81c77e45bb9 [^]
(0033131)
Stefan Roettger (reporter)
2013-05-24 19:33

As Jean-Christophe Fillion-Robin suggested I tried the updated cmake module.

This one includes the oflog library. Hence, it worked for my project. Good!

There are few quirks remaining, though. Those most likely have to be resolved upstream, but I do not know who is responsible, so I post it here hoping that somebody forwards it ;-)

1) dcmtk installs to /usr/local by default (at least on my mac when running "make install") but it does not find dcmtk at that standard location, because it inconsistently assumes the standard location to be /usr, which is odd. The work-around is to set DCMTK_DIR to /usr/local. Then find_package(DCMTK) works out-of-the-box.
   It would be better to locate dcmtk in standard directories like /usr _AND_ /usr/local if DCMTK_DIR is _NOT_ set.

2) I have to define HAVE_CONFIG_H manually. Otherwise I was not able to make my application compile with dcmtk. I do not see a sound reason why a library should require such a define when using a plain standard installation. It should be working without that! That's like a car with pedals swapped.

3) While the new dcmtk cmake module works, the packaged cmake module in cmake 2.8.11 is broken for sure. I'd suggest to either remove it completely from the cmake package or just add "oflog" to the loop to fix it until it is replaced with the new upstream version. Otherwise there will be other developers wasting time on finding out that it won't work with the actual dctmk version.

Thanks for your help and the quick replies!
Stefan
(0042287)
Kitware Robot (administrator)
2016-06-10 14:28

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2013-05-22 13:25 Stefan Roettger New Issue
2013-05-22 13:30 Brad King Assigned To => Mathieu Malaterre
2013-05-22 13:30 Brad King Status new => assigned
2013-05-22 13:39 Jean-Christophe Fillion-Robin Note Added: 0033112
2013-05-22 13:45 Brad King Note Added: 0033113
2013-05-22 15:23 Jean-Christophe Fillion-Robin Note Added: 0033114
2013-05-24 19:33 Stefan Roettger Note Added: 0033131
2016-06-10 14:28 Kitware Robot Note Added: 0042287
2016-06-10 14:28 Kitware Robot Status assigned => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team