summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/cmake/hdf5-config.cmake.in16
1 files changed, 14 insertions, 2 deletions
diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in
index 904c083..712dc05 100644
--- a/config/cmake/hdf5-config.cmake.in
+++ b/config/cmake/hdf5-config.cmake.in
@@ -158,9 +158,17 @@ foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE)
set (hdf5_comp2 "hdf5_hl_f90cstub")
set (hdf5_comp "hdf5_hl_fortran")
endif ()
- list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp}-${libtype}" HAVE_COMP)
+ if (${comp} STREQUAL "Java")
+ list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp}" HAVE_COMP)
+ else ()
+ list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp}-${libtype}" HAVE_COMP)
+ endif ()
if (${HAVE_COMP} LESS 0)
- set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 0)
+ if (${comp} STREQUAL "Java")
+ set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 0)
+ else ()
+ set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 0)
+ endif ()
else ()
if (hdf5_comp2)
list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp2}-${libtype}" HAVE_COMP2)
@@ -171,6 +179,10 @@ foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE)
string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY)
set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @HDF5_PACKAGE@::${hdf5_comp2}-${libtype} @HDF5_PACKAGE@::${hdf5_comp}-${libtype})
endif ()
+ elseif (${comp} STREQUAL "Java")
+ set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 1)
+ string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_LIBRARY COMP_LIBRARY)
+ set (${COMP_LIBRARY} ${${COMP_LIBRARY}} hdf5::${hdf5_comp})
else ()
set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 1)
string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY)