summaryrefslogtreecommitdiffstats
path: root/config/cmake/hdf5-config.cmake.in
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-09-19 17:39:45 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-09-19 17:39:45 (GMT)
commit0a9bc574e8d40b51c0c1c16501d3a0365e08df91 (patch)
treedcacbb8bd0368a3d1eebb44e1c93665ef78bdb6b /config/cmake/hdf5-config.cmake.in
parent32777d015b844ee45eb1721e48d89289c61c8ff0 (diff)
downloadhdf5-0a9bc574e8d40b51c0c1c16501d3a0365e08df91.zip
hdf5-0a9bc574e8d40b51c0c1c16501d3a0365e08df91.tar.gz
hdf5-0a9bc574e8d40b51c0c1c16501d3a0365e08df91.tar.bz2
Fix find package process
Diffstat (limited to 'config/cmake/hdf5-config.cmake.in')
-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)