diff options
author | Jeff Trawick <trawick@apache.org> | 2013-09-08 16:45:16 +0000 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2013-09-08 16:45:16 +0000 |
commit | dd62d4c10ad303da476960fde89868e55a937d23 (patch) | |
tree | da359f5911204e842ff9e10241cf374795549c63 | |
parent | d136769dfe86197198d2085e6125c0af63101305 (diff) | |
download | apr-dd62d4c10ad303da476960fde89868e55a937d23.tar.gz |
Allow control over the setting of _WINNT_WINNT
Default minimum Windows version:
0x0600 (Vista/Windows Server 2008)
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1520879 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | CMakeLists.txt | 19 | ||||
-rw-r--r-- | README.cmake | 9 | ||||
-rw-r--r-- | include/apr.hwc | 2 |
3 files changed, 27 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b3c6ca985..309d1a701 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,8 +43,12 @@ OPTION(APU_HAVE_ODBC "Build ODBC DBD driver" ON) OPTION(APR_HAVE_IPV6 "IPv6 support" ON) OPTION(APR_SHOW_SETTINGS "Show the build configuration" ON) OPTION(APR_BUILD_TESTAPR "Build the test suite" OFF) -SET(LIBXML2_ICONV_INCLUDE_DIR "" CACHE STRING "Directory with iconv include files for libxml2") -SET(LIBXML2_ICONV_LIBRARIES "" CACHE STRING "iconv libraries to link with for libxml2") +SET(MIN_WINDOWS_VER "Vista" + CACHE STRING "Minimum Windows version") +SET(LIBXML2_ICONV_INCLUDE_DIR "" + CACHE STRING "Directory with iconv include files for libxml2") +SET(LIBXML2_ICONV_LIBRARIES "" + CACHE STRING "iconv libraries to link with for libxml2") IF(NOT APU_USE_EXPAT AND NOT APU_USE_LIBXML2) MESSAGE(FATAL_ERROR "Either Expat or LibXml2 must be selected") @@ -80,6 +84,16 @@ ELSE() SET(apu_use_libxml2_10 1) ENDIF() +IF("${MIN_WINDOWS_VER}" STREQUAL "") + SET(win32_winnt_str "0x0600") +ELSEIF(${MIN_WINDOWS_VER} STREQUAL "Vista") + SET(win32_winnt_str "0x0600") +ELSEIF(${MIN_WINDOWS_VER} STREQUAL "Windows7") + SET(win32_winnt_str "0x0601") +ELSE() + SET(win32_winnt_str ${MIN_WINDOWS_VER}) +ENDIF() + CONFIGURE_FILE(include/apr.hwc ${PROJECT_BINARY_DIR}/apr.h) # "COPYONLY" just because anything else isn't implemented ;) @@ -509,6 +523,7 @@ IF(APR_SHOW_SETTINGS) MESSAGE(STATUS " DBD ODBC driver ................. : ${APU_HAVE_ODBC}") MESSAGE(STATUS " Use Expat ....................... : ${APU_USE_EXPAT}") MESSAGE(STATUS " Use LibXml2 ..................... : ${APU_USE_LIBXML2}") + MESSAGE(STATUS " Minimum Windows version ......... : ${MIN_WINDOWS_VER}") MESSAGE(STATUS " Library files for XML ........... : ${XMLLIB_LIBRARIES}") MESSAGE(STATUS " Build test suite ................ : ${APR_BUILD_TESTAPR}") MESSAGE(STATUS " Install private .h for httpd .... : ${APR_INSTALL_PRIVATE_H}") diff --git a/README.cmake b/README.cmake index 7049199ee..d5dc61305 100644 --- a/README.cmake +++ b/README.cmake @@ -89,6 +89,15 @@ How to build Default: ON APR_BUILD_TESTAPR Build APR test suite Default: OFF + MIN_WINDOWS_VER Minimum Windows version supported by this build + (This controls the setting of _WIN32_WINNT.) + "Vista" or "Windows7" or a numeric value like + "0x0601" + Default: "Vista" + For desktop/server equivalence or other values, + refer to + http://msdn.microsoft.com/en-us/library/windows/ + desktop/aa383745(v=vs.85).aspx LIBXML2_ICONV_INCLUDE_DIR, LIBXML2_ICONV_LIBRARIES diff --git a/include/apr.hwc b/include/apr.hwc index cf200a279..ebc6ca54d 100644 --- a/include/apr.hwc +++ b/include/apr.hwc @@ -191,7 +191,7 @@ #endif #ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0501 +#define _WIN32_WINNT @win32_winnt_str@ #endif #ifndef NOUSER |