<div dir="ltr"><div style>Hi Kent,</div><div><br></div>Excellent. Thanks for working on this. Let me know when it's ready to be tested and will give a try within Slicer and CTK.<div><br></div><div>Is the generated DCMTKConfig.cmake available in either the build or installed tree ? </div>
<div><br></div><div>Thanks</div><div>Jc</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 22, 2013 at 4:31 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>On 02/22/2013 02:47 PM, Williams, Norman K wrote:<br>
> My patch for ITK depends on the patched DCMTK. It might be possible to<br>
> maintain backwards compatibility with the old find_package and unpatched<br>
> DCMTK, but I'm not sure how to implement that. Would it be as simple as<br>
> this?<br>
><br>
> find_package(DCMTK NO_MODULE QUIET)<br>
> if(NOT DCMTK_FOUND)<br>
> find_package(DCMTK REQUIRED QUIET)<br>
> if(NOT DCMTK_FOUND)<br>
> message(FATAL_ERROR "DCMTK package not found. Please set DCMTK_DIR and<br>
> re-run CMake")<br>
> endif()<br>
> endif()<br>
<br>
</div>You can teach FindDCMTK to try the NO_MODULE mode first and then<br>
fall back to the rest of its implementation. Add something like<br>
this at the top of FindDCMTK in ITK (untested):<br>
<br>
if(NOT DCMTK_FOUND)<br>
find_package(DCMTK NO_MODULE QUIET)<br>
endif()<br>
if(DCMTK_FOUND)<br>
return()<br>
endif()<br>
<br>
Of course the rest of the logic for exports will have to be<br>
conditional on how DCMTK was found.<br>
<span><font color="#888888"><br>
-Brad<br>
</font></span><div><div>_______________________________________________<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><a href="tel:%2B1%20919%20869%208849" value="+19198698849" target="_blank">+1 919 869 8849</a><br>
</div></div>