<font face="verdana,sans-serif"><br></font><br><div class="gmail_quote">On Wed, Sep 1, 2010 at 8:06 AM, Michael Jackson <span dir="ltr"><<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">This probably isn't the best solution but until CMake fixes the bug and includes the updated FindHDF5.cmake file in the next or future release this is what you have to do:<br>
<br>
Copy the FindHDF5.cmake file from the current CMake distribution that you are using and place it somewhere in your project folder, say ${PROJECT_ROOT}/Resources/CMake/Modules.<br>
<br>
Then in your CMakeLists.txt file use the following line somewhere BEFORE you start looking for your libraries:<br>
<br>
set (CMAKE_MODULES_DIR ${PROJECT_SOURCE_DIR}/Resources/CMake/Modules ${CMAKE_MODULE_PATH})<br>
<br>
Now, edit the FindHDF5.cmake file (the one that you copied into your project) to remove the offending lines/fix the bug. The above line will effectively substitute your corrected version for the one that ships with cmake. When CMake has a release where the bug is fixed then you can remove this workaround.<br>
<br>
If your fix is general enough attach the corrected file to the bug report.<br>
<br>
Cheers.<div class="im"><br>
___________________________________________________________<br>
Mike Jackson <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
</div></blockquote></div><br><br><br style="font-family: verdana,sans-serif;"><span style="font-family: verdana,sans-serif;">Just in case someone else tries this, there was a typo above. Use the following:</span><br style="font-family: verdana,sans-serif;">
<br style="font-family: verdana,sans-serif;"><span style="font-family: verdana,sans-serif;">set ( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/Resources/CMake/Modules ${CMAKE_MODULE_PATH} )</span><br style="font-family: verdana,sans-serif;">
<br style="font-family: verdana,sans-serif;"><span style="font-family: verdana,sans-serif;">Also, as per Mike Jackson's suggestion (off-list), the following changes are necessary in FindHDF5.cmake:</span><br style="font-family: verdana,sans-serif;">
<blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; font-family: verdana,sans-serif;" class="gmail_quote">Line 178:<br> set( HDF5_C_LIBRARY_NAMES_INIT hdf5_hl hdf5 )<br>
<br>
change to<br>
set( HDF5_C_LIBRARY_NAMES_INIT hdf5 )<br></blockquote>
<br style="font-family: verdana,sans-serif;"><span style="font-family: verdana,sans-serif;">This fixed the problem for me.</span><br style="font-family: verdana,sans-serif;"><br style="font-family: verdana,sans-serif;"><span style="font-family: verdana,sans-serif;">Many thanks to Mike for the quick fix!</span><br>
<br style="font-family: verdana,sans-serif;"><span style="font-family: verdana,sans-serif;">James</span><br>