diff options
author | Mark Kittisopikul <mkitti@users.noreply.github.com> | 2023-01-17 15:27:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-17 15:27:25 (GMT) |
commit | 720e04e196aac60b8914830b0297fdf291cb7f00 (patch) | |
tree | de1e7dec652e3805fcdbe18ee76359fe2cddad20 /config | |
parent | 5543d6eb36bbb32ede0598b0f36641933368f90f (diff) | |
download | hdf5-720e04e196aac60b8914830b0297fdf291cb7f00.zip hdf5-720e04e196aac60b8914830b0297fdf291cb7f00.tar.gz hdf5-720e04e196aac60b8914830b0297fdf291cb7f00.tar.bz2 |
Include shlwapi.h explicitly on Windows (#2407)
* Include shlwapi.h explicitly
* Add shlwapi library to LINK_LIB when header is detected
Looking for StrStrIA in the shlwapi library is not reliable due
to stdcall on mingw32.
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/ConfigureChecks.cmake | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index ef434b3..70a2104 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -131,6 +131,8 @@ CHECK_INCLUDE_FILE_CONCAT ("netdb.h" ${HDF_PREFIX}_HAVE_NETDB_H) CHECK_INCLUDE_FILE_CONCAT ("arpa/inet.h" ${HDF_PREFIX}_HAVE_ARPA_INET_H) if (WINDOWS) CHECK_INCLUDE_FILE_CONCAT ("shlwapi.h" ${HDF_PREFIX}_HAVE_SHLWAPI_H) + # Checking for StrStrIA in the library is not relaible for mingw32 to stdcall + set (LINK_LIBS ${LINK_LIBS} "shlwapi") endif () ## Check for non-standard extension quadmath.h @@ -156,10 +158,6 @@ if (MINGW OR NOT WINDOWS) CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" gethostbyname ${HDF_PREFIX}_HAVE_LIBWSOCK32) endif () -if (WINDOWS) - CHECK_LIBRARY_EXISTS_CONCAT ("shlwapi" StrStrIA ${HDF_PREFIX}_HAVE_SHLWAPI) -endif () - # UCB (BSD) compatibility library CHECK_LIBRARY_EXISTS_CONCAT ("ucb" gethostname ${HDF_PREFIX}_HAVE_LIBUCB) |