diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-09-19 17:39:18 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-09-19 17:39:27 (GMT) |
commit | b8039b3e00c7da44c746a683b7f357a578670aa8 (patch) | |
tree | 87db9642c20036e88cd080114ab9c53dd91d7414 /config/cmake/hdf5-config.cmake.in | |
parent | ea715aac255f6e13920ac9ed1d6a8264b769b469 (diff) | |
download | hdf5-b8039b3e00c7da44c746a683b7f357a578670aa8.zip hdf5-b8039b3e00c7da44c746a683b7f357a578670aa8.tar.gz hdf5-b8039b3e00c7da44c746a683b7f357a578670aa8.tar.bz2 |
Fix find package process
Diffstat (limited to 'config/cmake/hdf5-config.cmake.in')
-rw-r--r-- | config/cmake/hdf5-config.cmake.in | 16 |
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) |