IF(WIN32)
IF(WINDOWS_VERSION STREQUAL "WIN8")
+ SET(NTDDI_VERSION 0x06020000)
+ SET(_WIN32_WINNT 0x0602)
SET(WINVER 0x0602)
ELSEIF(WINDOWS_VERSION STREQUAL "WIN7")
+ SET(NTDDI_VERSION 0x06010000)
+ SET(_WIN32_WINNT 0x0601)
SET(WINVER 0x0601)
ELSEIF(WINDOWS_VERSION STREQUAL "WS08")
+ SET(NTDDI_VERSION 0x06000100)
+ SET(_WIN32_WINNT 0x0600)
SET(WINVER 0x0600)
ELSEIF(WINDOWS_VERSION STREQUAL "VISTA")
+ SET(NTDDI_VERSION 0x06000000)
+ SET(_WIN32_WINNT 0x0600)
SET(WINVER 0x0600)
ELSEIF(WINDOWS_VERSION STREQUAL "WS03")
+ SET(NTDDI_VERSION 0x05020000)
+ SET(_WIN32_WINNT 0x0502)
SET(WINVER 0x0502)
ELSEIF(WINDOWS_VERSION STREQUAL "WINXP")
+ SET(NTDDI_VERSION 0x05010000)
+ SET(_WIN32_WINNT 0x0501)
SET(WINVER 0x0501)
ELSE(WINDOWS_VERSION STREQUAL "WIN8")
- # The default is to use Windows 2000 API.
- SET(WINVER 0x0500)
+ # Default to Windows Server 2003 API if we don't recognize the specifier
+ SET(NTDDI_VERSION 0x05020000)
+ SET(_WIN32_WINNT 0x0502)
+ SET(WINVER 0x0502)
ENDIF(WINDOWS_VERSION STREQUAL "WIN8")
- SET(_WIN32_WINNT ${WINVER})
ENDIF(WIN32)
IF(MSVC)
/* Define for large files, on AIX-style hosts. */
#cmakedefine _LARGE_FILES ${_LARGE_FILES}
-/* Define for Windows to use Windows 2000+ APIs. */
+/* Define to control Windows SDK version */
+#ifndef NTDDI_VERSION
+#cmakedefine NTDDI_VERSION ${NTDDI_VERSION}
+#endif // NTDDI_VERSION
+
#ifndef _WIN32_WINNT
#cmakedefine _WIN32_WINNT ${_WIN32_WINNT}
#endif // _WIN32_WINNT
# Set up defines needed before including any headers
case $host in
*mingw* | *cygwin* )
- AC_DEFINE([_WIN32_WINNT], 0x0500, [Define to '0x0500' for Windows 2000 APIs.])
- AC_DEFINE([WINVER], 0x0500, [Define to '0x0500' for Windows 2000 APIs.])
+ AC_DEFINE([_WIN32_WINNT], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.])
+ AC_DEFINE([WINVER], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.])
+ AC_DEFINE([NTDDI_VERSION], 0x05020000, [Define to '0x05020000' for Windows Server 2003 APIs.])
;;
esac