Just thinking out loud but we could make an "external_project" call instead. This would sync, configure, build and install it easily without needing to override anything. And then ParaView would just FindPackage(HDF5) with the internal build directory as a hint.<br>
<br><div class="gmail_quote">On Thu, Apr 15, 2010 at 5:40 AM, Biddiscombe, John A. <span dir="ltr"><<a href="mailto:biddisco@cscs.ch">biddisco@cscs.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-GB" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Within paraview we wish to build hdf5, which is now cmake
based, so we ADD_SUBDIRECTORY(blah) and hdf5 is compiled nicely with lib
targets added to the build.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Some settings (like lib names) are needed by the host
project, so we want to </p>
<p class="MsoNormal" style="text-autospace:none"><b><span style="font-size:10.0pt;font-family:"Courier New"">SET(HDF5_CONFIG
${ParaView_BINARY_DIR}/Utilities/hdf5-1.8/HDF5-config.cmake)</span></b><span style="font-size:10.0pt;font-family:"Courier New""></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span style="font-size:10.0pt;font-family:"Courier New"">INCLUDE(${HDF5_CONFIG})</span></b><span style="font-size:10.0pt;font-family:"Courier New""></span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">But this file – which is generated for us by cmake and
placed in the build tree – has contents like</p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Courier New"">#
Create imported target vtkhdf5</span></b></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Courier New"">ADD_LIBRARY(vtkhdf5
SHARED IMPORTED) </span></b></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Courier New""> </span></b></p>
<p class="MsoNormal">And naturally if I include this inside the host project build
– it complains that vtkhdf5 can’t be added as an imported library
as it is already a target in the main build – created when I did
add_subdirectoy for the hdf5 source.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Is there a similar functionality, other than the ‘old
style’ configure_file command to generate a bunch of settings that can be
picked up by the host project. I had the impression that the new project import/export/install
stuff was designed to make this sort of thing more automated, but I think I’m
missing a piece of the puzzle.<b><span style="font-size:10.0pt;font-family:"Courier New""></span></b></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Courier New""> </span></b></p>
<p class="MsoNormal">thanks</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">JB</p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Courier New""> </span></b></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Consolas">--
</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Consolas">John
Biddiscombe,
email:biddisco @ <a href="http://cscs.ch" target="_blank">cscs.ch</a></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Consolas"><a href="http://www.cscs.ch/" target="_blank"><span style="color:blue">http://www.cscs.ch/</span></a></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Consolas">CSCS,
Swiss National Supercomputing Centre | Tel: +41 (91) 610.82.07</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:Consolas">Via
Cantonale, 6928 Manno, Switzerland | Fax:
+41 (91) 610.82.82</span></p>
<p class="MsoNormal"> </p>
</div>
</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br>