<div>Folks, </div><div><br></div>Few months ago, while working on Slicer, I needed to build zlib. For that purpose, I extracted the tree used in CMake, made sure it could be installed and found using FindZLIB and finally added the option ZLIB_MANGLE_PREFIX so that it can be configured with any prefix.<div>
<br></div><div>Consider looking at: <a href="https://github.com/commontk/zlib/commits/">https://github.com/commontk/zlib/commits/</a></div><div><br></div><div>Hth</div><div>Jc</div><div><br><div class="gmail_quote">On Wed, Jun 6, 2012 at 12:45 PM, Brad King <span dir="ltr"><<a href="mailto:brad.king@kitware.com" target="_blank">brad.king@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, Jun 6, 2012 at 12:37 PM, Williams, Norman K<br>
<<a href="mailto:norman-k-williams@uiowa.edu">norman-k-williams@uiowa.edu</a>> wrote:<br>
> I almost have DCMTK building properly against the ITK zlib/tiff/jpeg<br>
> libraries.<br>
><br>
> There is one remaining problem -- it looks like you can't get the<br>
> ITK-mangled zlib symbols unless you include itk_zlib.h.<br>
><br>
> All the third-party modules are patched to include itk_zlib.h -- I can<br>
> write a CMake script to run through all the DCMTK source after it's<br>
> downloaded and replace the #include statements, but is there a more<br>
> elegant way to deal with this?<br>
<br>
</div>Including "itk_zlib.h" is the defined way to get the zlib ITK is<br>
configured to use whether it is the built in one or the system one.<br>
In the case of the built-in itkzlib, it ensures that our zlib.h header<br>
is included and not the system one. This is important because ours<br>
provides the mangling.<br>
<br>
You'll have to hack the external code to include the proper name.<br>
Otherwise we cannot be sure it will get the right header.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Brad<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>+1 919 869 8849<br><br>
</div>