Skip to content

Commit

Permalink
Respect RESINSIGHT_ENABLED_HDF5 flag on linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
kriben committed Aug 16, 2024
1 parent b324fdb commit 3f2c669
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -422,22 +422,24 @@ if(MSVC)
)
endif()
else()
find_package(HDF5 COMPONENTS CXX)
if(HDF5_FOUND)
list(APPEND EXTERNAL_LINK_LIBRARIES ${HDF5_LIBRARIES})

set(RESINSIGHT_FOUND_HDF5 1)
message(STATUS "Using HDF5 libraries : ${HDF5_LIBRARIES}")

option(RESINSIGHT_HDF5_BUNDLE_LIBRARIES "Bundle HDF5 libraries" OFF)
mark_as_advanced(FORCE RESINSIGHT_HDF5_BUNDLE_LIBRARIES)
if(RESINSIGHT_HDF5_BUNDLE_LIBRARIES)
message(STATUS "Bundling of HDF5 libraries is enabled")
endif() # RESINSIGHT_HDF5_BUNDLE_LIBRARIES

else()
message(WARNING "Use of HDF5 is enabled, but no HDF5 is found.")
endif() # HDF5_FOUND
if(RESINSIGHT_ENABLE_HDF5)
find_package(HDF5 COMPONENTS CXX)
if(HDF5_FOUND)
list(APPEND EXTERNAL_LINK_LIBRARIES ${HDF5_LIBRARIES})

set(RESINSIGHT_FOUND_HDF5 1)
message(STATUS "Using HDF5 libraries : ${HDF5_LIBRARIES}")

option(RESINSIGHT_HDF5_BUNDLE_LIBRARIES "Bundle HDF5 libraries" OFF)
mark_as_advanced(FORCE RESINSIGHT_HDF5_BUNDLE_LIBRARIES)
if(RESINSIGHT_HDF5_BUNDLE_LIBRARIES)
message(STATUS "Bundling of HDF5 libraries is enabled")
endif() # RESINSIGHT_HDF5_BUNDLE_LIBRARIES

else()
message(WARNING "Use of HDF5 is enabled, but no HDF5 is found.")
endif() # HDF5_FOUND
endif()
endif() # MSVC

# ##############################################################################
Expand Down

0 comments on commit 3f2c669

Please sign in to comment.