summaryrefslogtreecommitdiffstats
path: root/config/cmake_ext_mod
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake_ext_mod')
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake13
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake7
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}"