From 8175ae8efec79dd2cd360ae97cedd46c07ce0a15 Mon Sep 17 00:00:00 2001 From: Stein Inge Dale Date: Mon, 13 Mar 2017 12:22:11 +0100 Subject: [PATCH] #1311 Modified build config --- ApplicationCode/CMakeLists.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ApplicationCode/CMakeLists.txt b/ApplicationCode/CMakeLists.txt index 3330eb7508..118ea3e2cc 100644 --- a/ApplicationCode/CMakeLists.txt +++ b/ApplicationCode/CMakeLists.txt @@ -183,10 +183,17 @@ add_subdirectory(GeoMech/GeoMechDataModel) # option(RESINSIGHT_ENABLE_HDF5 "Use HDF5" OFF) if(RESINSIGHT_ENABLE_HDF5) - find_package(HDF5 REQUIRED) + add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB) + find_package(HDF5 REQUIRED COMPONENTS CXX) if (HDF5_FOUND) - add_definitions(-DUSE_HDF5) - set(RESINSIGHT_USE_HDF5 1) + add_definitions(${HDF5_DEFINITIONS}) + include_directories(${HDF5_INCLUDE_DIRS}) + add_definitions(-DUSE_HDF5) + + list(APPEND THIRD_PARTY_LIBRARIES + ${HDF5_LIBRARIES} + ) + if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") message( STATUS "Using HD5 from : ${HDF5_C_LIBRARY}" ) endif()