summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-06-05 19:36:41 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-06-05 19:36:41 (GMT)
commita11a6d9b34f9317a28e62282dae20a745a845bff (patch)
treed9e81f994adb591ea053c2048173b49b2b9c2341 /config
parent65bf87c4a6ed88ba79ced745400245c2486b4283 (diff)
downloadhdf5-a11a6d9b34f9317a28e62282dae20a745a845bff.zip
hdf5-a11a6d9b34f9317a28e62282dae20a745a845bff.tar.gz
hdf5-a11a6d9b34f9317a28e62282dae20a745a845bff.tar.bz2
[svn-r22437] Correct Windows cmake config files
Tested: windows
Diffstat (limited to 'config')
-rw-r--r--config/cmake/ConfigureChecks.cmake33
1 files changed, 26 insertions, 7 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 274434b..60ba6a7 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -123,6 +123,8 @@ IF (WIN32)
SET (WINDOWS 1) # MinGW tries to imitate Windows
ENDIF (MINGW)
SET (H5_HAVE_WIN32_API 1)
+ SET (CMAKE_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
+ SET (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1")
IF (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
SET (WINDOWS 1)
IF (MSVC)
@@ -151,7 +153,7 @@ IF (WINDOWS)
# that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/").
# (This flag should be _unset_ for all machines, except for Windows)
SET (H5_HAVE_WINDOW_PATH 1)
- SET (LINK_LIBS ${LINK_LIBS} "kernel32")
+# SET (LINK_LIBS ${LINK_LIBS} "kernel32")
ENDIF (WINDOWS)
IF (WINDOWS)
@@ -177,6 +179,9 @@ IF (WINDOWS)
SET (H5_HAVE_TIMEZONE 1)
SET (H5_HAVE_GETTIMEOFDAY 1)
SET (H5_LONE_COLON 0)
+
+ SET (H5_HAVE_LIBWS2_32 1)
+ SET (H5_HAVE_LIBWSOCK32 1)
ENDIF (WINDOWS)
#-----------------------------------------------------------------------------
@@ -201,10 +206,10 @@ ENDIF (CYGWIN)
#-----------------------------------------------------------------------------
IF (NOT WINDOWS)
CHECK_LIBRARY_EXISTS_CONCAT ("m" ceil H5_HAVE_LIBM)
+ CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" WSAStartup H5_HAVE_LIBWS2_32)
+ CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" gethostbyname H5_HAVE_LIBWSOCK32)
ENDIF (NOT WINDOWS)
-CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" WSAStartup H5_HAVE_LIBWS2_32)
-CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" gethostbyname H5_HAVE_LIBWSOCK32)
CHECK_LIBRARY_EXISTS_CONCAT ("ucb" gethostname H5_HAVE_LIBUCB)
CHECK_LIBRARY_EXISTS_CONCAT ("socket" connect H5_HAVE_LIBSOCKET)
CHECK_LIBRARY_EXISTS ("c" gethostbyname "" NOT_NEED_LIBNSL)
@@ -213,6 +218,8 @@ IF (NOT NOT_NEED_LIBNSL)
CHECK_LIBRARY_EXISTS_CONCAT ("nsl" gethostbyname H5_HAVE_LIBNSL)
ENDIF (NOT NOT_NEED_LIBNSL)
+# For other tests to use the same libraries
+SET (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${LINK_LIBS})
SET (USE_INCLUDES "")
IF (WINDOWS)
@@ -547,9 +554,6 @@ IF (NOT H5_SIZEOF_OFF64_T)
SET (H5_SIZEOF_OFF64_T 0)
ENDIF (NOT H5_SIZEOF_OFF64_T)
-# For other tests to use the same libraries
-SET (CMAKE_REQUIRED_LIBRARIES ${LINK_LIBS})
-
#-----------------------------------------------------------------------------
# Check if the dev_t type is a scalar type
#-----------------------------------------------------------------------------
@@ -1164,4 +1168,19 @@ H5ConversionTests (H5_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restricti
# problem converting from unsigned long long to long double */
IF (CYGWIN)
SET (H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM 1)
-ENDIF (CYGWIN) \ No newline at end of file
+ENDIF (CYGWIN)
+
+# -----------------------------------------------------------------------
+# wrapper script variables
+#
+SET (prefix ${CMAKE_INSTALL_PREFIX})
+SET (exec_prefix "\${prefix}")
+SET (libdir "${exec_prefix}/lib")
+SET (includedir "\${prefix}/include")
+SET (host_os ${CMAKE_HOST_SYSTEM_NAME})
+SET (CC ${CMAKE_C_COMPILER})
+SET (CXX ${CMAKE_CXX_COMPILER})
+SET (FC ${CMAKE_Fortran_COMPILER})
+FOREACH (LINK_LIB ${LINK_LIBS})
+ SET (LIBS "${LIBS} -l${LINK_LIB}")
+ENDFOREACH (LINK_LIB ${LINK_LIBS})