[osg-users] Building with DCMTK that uses libiconv

Robert Osfield robert.osfield at gmail.com
Tue Dec 8 00:56:09 PST 2015

Hi Andrew,

This extra dependency should probably be added to the CMake FindDCMK.cmake,
you'll find it in the Modules/FindDCMK.cmake entry.  The DCMTK_LIBRARIES
entry would then contain this additional external dependency, which in turn
would mean the OSG itself wouldn't need to be modified.
It would seem to me like Homebrew is making a few decisions that aren't
backed up with things like CMake scripts to support their particular build

As a general note, with platform specific issues like this you want to keep
the specifics in the Find scripts, possibly with the option of a user
editable flag.


On 7 December 2015 at 22:36, Andrew Janke <floss at apjanke.net> wrote:

> Hi, OpenSceneGraph folks.
> I ran in to an issue while building OpenSceneGraph on Mac OS X the other
> day. DCMTK can be built with libiconv support, in which case any program
> linking in dcmtk will also need to link in libiconv. The OpenSceneGraph
> build script seems to assume that dcmtk was built without libiconv, so
> doesn't attempt to link it.
> Originally found this through a report to Homebrew:
> https://github.com/Homebrew/homebrew/issues/46356
> https://github.com/Homebrew/homebrew/pull/46388
> Homebrew's dcmtk is always built with libiconv, so as a workaround we just
> hacked it to unconditionally link libiconv.
> diff --git a/src/osgPlugins/dicom/CMakeLists.txt b/src/osgPlugins/dicom/CMakeLists.txt
> index 55c2a57..e6e3f4a 100644
> --- a/src/osgPlugins/dicom/CMakeLists.txt
> +++ b/src/osgPlugins/dicom/CMakeLists.txt
> @@ -5,7 +5,7 @@ IF  (DCMTK_FOUND)
>      SET(TARGET_SRC ReaderWriterDICOM.cpp )
> That won't work in general though; seems like the build script would need
> to query dcmtk to see if it used libiconv and detect libiconv's
> installation location as well. The dcmtk installation includes a lib/cmake
> directory with information on how dcmtk was built; that might be an easy
> way to get at it.
> Cheers,
> Andrew Janke
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151208/43526219/attachment-0003.htm>

More information about the osg-users mailing list