On Wed, Sep 1, 2010 at 8:06 AM, Michael Jackson <mike.jack...@bluequartz.net > wrote:
> 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: > > 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. > > Then in your CMakeLists.txt file use the following line somewhere BEFORE > you start looking for your libraries: > > set (CMAKE_MODULES_DIR ${PROJECT_SOURCE_DIR}/Resources/CMake/Modules > ${CMAKE_MODULE_PATH}) > > 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. > > If your fix is general enough attach the corrected file to the bug report. > > Cheers. > > ___________________________________________________________ > Mike Jackson www.bluequartz.net > Just in case someone else tries this, there was a typo above. Use the following: set ( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/Resources/CMake/Modules ${CMAKE_MODULE_PATH} ) Also, as per Mike Jackson's suggestion (off-list), the following changes are necessary in FindHDF5.cmake: > Line 178: > set( HDF5_C_LIBRARY_NAMES_INIT hdf5_hl hdf5 ) > > change to > set( HDF5_C_LIBRARY_NAMES_INIT hdf5 ) > This fixed the problem for me. Many thanks to Mike for the quick fix! James
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake