<div dir="ltr"><div><div>Hi Andrew,<br><br></div>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. <br> 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 decisions.</div><div><br></div><div>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.<br><br></div>Robert.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 December 2015 at 22:36, Andrew Janke <span dir="ltr"><<a href="mailto:floss@apjanke.net" target="_blank">floss@apjanke.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hi, OpenSceneGraph folks.<br>
<br>
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.<br>
<br>
<br>
Originally found this through a report to Homebrew:<br>
<br>
<a href="https://github.com/Homebrew/homebrew/issues/46356" target="_blank">https://github.com/Homebrew/homebrew/issues/46356</a><br>
<a href="https://github.com/Homebrew/homebrew/pull/46388" target="_blank">https://github.com/Homebrew/homebrew/pull/46388</a><br>
<br>
<br>
Homebrew's dcmtk is always built with libiconv, so as a workaround
we just hacked it to unconditionally link libiconv.<br>
<pre>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 )
- LINK_LIBRARIES(${DCMTK_LIBRARIES} ${ZLIB_LIBRARY})
+ LINK_LIBRARIES(${DCMTK_LIBRARIES} iconv ${ZLIB_LIBRARY})
ADD_DEFINITIONS(-DUSE_DCMTK)
</pre>
<br>
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.<br>
<br>
Cheers,<br>
Andrew Janke<br>
</div>
<br>_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<br></blockquote></div><br></div>