#2313 Make sure ResInsight compiles if HDF5 is not available on Linux

This commit is contained in:
Magne Sjaastad 2018-01-05 07:06:55 +01:00
parent 92cc4f4dbe
commit 0f30433286

View File

@ -164,9 +164,9 @@ if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_SOURING)
message( WARNING "Use of HDF5 is enabled, but RESINSIGHT_HDF5_DIR is empty. Specify RESINSIGHT_HDF5_DIR to be able to use HDF5" )
endif()
else()
add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB)
find_package(HDF5 REQUIRED COMPONENTS CXX)
find_package(HDF5 COMPONENTS CXX)
if (HDF5_FOUND)
add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB)
add_definitions(${HDF5_DEFINITIONS})
include_directories(${HDF5_INCLUDE_DIRS})