Skip to content
Snippets Groups Projects
Commit ba8772f1 authored by root's avatar root
Browse files

Changes to cmake file so that we can find the correct static library.

parent 6bc4ced8
No related branches found
No related tags found
No related merge requests found
......@@ -218,16 +218,21 @@ if(NOT HDF5_FOUND)
endif(NOT HDF5_FOUND)
if(HDF5_FOUND)
include_directories( ${HDF5_INCLUDE_DIRS} )
add_definitions( -DUSE_HDF5 )
# Latest cmake could not find libhdf5_hl.a libraries despite of setting
# USE_HDF5_STATIC_LIBRARIES.
if(USE_HDF5_STATIC_LIBRARIES AND $ENV{HDF5_ROOT})
find_library(HDF5_CXX_LIBRARIES libhdf5.a PATHS $ENV{HDF5_ROOT})
find_library(HDF5_HL_LIBRARIES libhdf5_hl.a PATHS $ENV{HDF5_ROOT})
if(HDF5_USE_STATIC_LIBRARIES)
message(STATUS "Finding static HDF5 libraries in $ENV{HDF5_ROOT}")
find_library(HDF5_CXX_LIBRARIES NAMES libhdf5.a
PATHS $ENV{HDF5_ROOT}/lib $ENV{HDF5_ROOT}/lib64
)
find_library(HDF5_HL_LIBRARIES NAMES libhdf5_hl.a
PATHS $ENV{HDF5_ROOT}/lib $ENV{HDF5_ROOT}/lib64
)
endif()
include_directories( ${HDF5_INCLUDE_DIRS} )
foreach(HDF5_LIB ${HDF5_CXX_LIBRARIES} ${HDF5_HL_LIBRARIES} )
set(HDF5_LIBRARIES ${HDF5_CXX_LIBRARIES} ${HDF5_HL_LIBRARIES})
message(STATUS "MOOSE will use ${HDF5_LIBRARIES}" )
foreach(HDF5_LIB ${HDF5_LIBRARIES})
if(HDF5_LIB)
get_filename_component( HDF5_LIB_EXT ${HDF5_LIB} EXT )
if(HDF5_LIB_EXT)
......
3.1.1-55-g1cd7d7e
\ No newline at end of file
3.1.1
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment