diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-07-12 19:25:33 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-07-17 16:58:02 (GMT) |
commit | 7a9c852c2c1be7fd0b7c3a97b3e7f81227b35b43 (patch) | |
tree | 1aa67a97fbe2e3dba7e469917fd6020465dda591 /config | |
parent | 7174b5c135f39b448925551c433cb60fc618d7af (diff) | |
download | hdf5-7a9c852c2c1be7fd0b7c3a97b3e7f81227b35b43.zip hdf5-7a9c852c2c1be7fd0b7c3a97b3e7f81227b35b43.tar.gz hdf5-7a9c852c2c1be7fd0b7c3a97b3e7f81227b35b43.tar.bz2 |
HDFFV-8631, HDFFV-10595, HDFFV-10845
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake_ext_mod/ConfigureChecks.cmake | 13 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFMacros.cmake | 7 |
2 files changed, 11 insertions, 9 deletions
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index 35ec3e9..a951429 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -66,15 +66,12 @@ set (WINDOWS) if (MINGW) set (${HDF_PREFIX}_HAVE_MINGW 1) set (WINDOWS 1) # MinGW tries to imitate Windows - set (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1") + set (${HDF_PREFIX}_HAVE_WINSOCK2_H 1) endif () if (WIN32) - set (${HDF_PREFIX}_HAVE_WIN32_API 1) - set (HDF5_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib") - if (NOT UNIX AND NOT MINGW) + if (NOT UNIX) set (WINDOWS 1) - set (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1") if (MSVC) set (${HDF_PREFIX}_HAVE_VISUAL_STUDIO 1) endif () @@ -82,6 +79,9 @@ if (WIN32) endif () if (WINDOWS) + set (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1") + set (HDF5_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib") + set (${HDF_PREFIX}_HAVE_WIN32_API 1) set (${HDF_PREFIX}_HAVE_STDDEF_H 1) set (${HDF_PREFIX}_HAVE_SYS_STAT_H 1) set (${HDF_PREFIX}_HAVE_SYS_TYPES_H 1) @@ -99,9 +99,6 @@ if (WINDOWS) set (${HDF_PREFIX}_GETTIMEOFDAY_GIVES_TZ 1) set (${HDF_PREFIX}_HAVE_TIMEZONE 1) set (${HDF_PREFIX}_HAVE_GETTIMEOFDAY 1) - if (MINGW) - set (${HDF_PREFIX}_HAVE_WINSOCK2_H 1) - endif () set (${HDF_PREFIX}_HAVE_LIBWS2_32 1) set (${HDF_PREFIX}_HAVE_LIBWSOCK32 1) endif () diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 0a4598d..d145607 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -179,7 +179,12 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion) ) endif () else () - if (CYGWIN) + if (MINGW) + set_target_properties (${libtarget} PROPERTIES + IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${IMPORT_LIB_NAME}.lib" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" + ) + elseif (CYGWIN) set_target_properties (${libtarget} PROPERTIES IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" |