summaryrefslogtreecommitdiffstats
path: root/HDF5Examples/config/cmake/HDFExampleMacros.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'HDF5Examples/config/cmake/HDFExampleMacros.cmake')
-rw-r--r--HDF5Examples/config/cmake/HDFExampleMacros.cmake26
1 files changed, 12 insertions, 14 deletions
diff --git a/HDF5Examples/config/cmake/HDFExampleMacros.cmake b/HDF5Examples/config/cmake/HDFExampleMacros.cmake
index 245003c..5c425db 100644
--- a/HDF5Examples/config/cmake/HDFExampleMacros.cmake
+++ b/HDF5Examples/config/cmake/HDFExampleMacros.cmake
@@ -132,18 +132,6 @@ macro (HDF5_SUPPORT)
message (STATUS "HDF5 Fortran libs: static:${HDF5_static_Fortran_FOUND} and shared:${HDF5_shared_Fortran_FOUND}")
message (STATUS "HDF5 Java libs: ${HDF5_Java_FOUND}")
if (HDF5_FOUND)
- if (USE_SHARED_LIBS)
- if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared)
- add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED)
- endif ()
- set (H5EX_HDF5_DUMP_EXECUTABLE $<TARGET_FILE:${HDF5_NAMESPACE}h5dump-shared>)
- else ()
- if (NOT TARGET ${HDF5_NAMESPACE}h5dump)
- add_executable (${HDF5_NAMESPACE}h5dump IMPORTED)
- endif()
- set (H5EX_HDF5_DUMP_EXECUTABLE $<TARGET_FILE:${HDF5_NAMESPACE}h5dump>)
- endif()
-
if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND)
#find library from non-dual-binary package
set (FIND_HDF_COMPONENTS C)
@@ -177,11 +165,21 @@ macro (HDF5_SUPPORT)
if (USE_SHARED_LIBS AND HDF5_shared_C_FOUND)
set (H5EX_HDF5_LINK_LIBS ${H5EX_HDF5_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY})
set (HDF5_LIBRARY_PATH ${PACKAGE_PREFIX_DIR}/lib)
- set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared")
else ()
set (H5EX_HDF5_LINK_LIBS ${H5EX_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY})
- set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump")
endif ()
+ if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND)
+ if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared)
+ add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED)
+ endif ()
+ set (H5EX_HDF5_DUMP_EXECUTABLE $<TARGET_FILE:${HDF5_NAMESPACE}h5dump-shared>)
+ else ()
+ if (NOT TARGET ${HDF5_NAMESPACE}h5dump)
+ add_executable (${HDF5_NAMESPACE}h5dump IMPORTED)
+ endif()
+ set (H5EX_HDF5_DUMP_EXECUTABLE $<TARGET_FILE:${HDF5_NAMESPACE}h5dump>)
+ endif()
+
if (NOT HDF5_static_Fortran_FOUND AND NOT HDF5_shared_Fortran_FOUND)
set (HDF_BUILD_FORTRAN OFF CACHE BOOL "Build FORTRAN support" FORCE)
message (STATUS "HDF5 Fortran libs not found - disable build of Fortran examples")