summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Mejia <amejia004@gmail.com>2013-02-01 18:46:30 -0500
committerAndres Mejia <amejia004@gmail.com>2013-02-01 18:46:30 -0500
commit4b234e8bf8a0f6a42400635ee784b02d160b95e4 (patch)
tree2ee895624d59eb210b3fd56c23183319ddfe015e
parent58dc42aaea93cd281aafaaaa4c3926c3578b7e26 (diff)
downloadlibarchive-4b234e8bf8a0f6a42400635ee784b02d160b95e4.tar.gz
Use a string option WINDOWS_VERSION to set WINVER and _WIN32_WINNT in Windows build.
This will allow using WINVER for VISTA and up so that crypto checks for SHA256, SHA384, and SHA512 will pass.
-rw-r--r--CMakeLists.txt19
1 files changed, 14 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e8a0bd98..ac9186e9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -153,17 +153,26 @@ OPTION(ENABLE_ICONV "Enable iconv support" ON)
OPTION(ENABLE_PCREPOSIX "Enable POSIX regular expression support using PCRE" OFF)
OPTION(ENABLE_TEST "Enable unit and regression tests" ON)
SET(ENABLE_SAFESEH "AUTO" CACHE STRING "Enable use of /SAFESEH linker flag (MSVC only)")
+SET(WINDOWS_VERSION "WINXP" CACHE STRING "Set Windows version to use (Windows only)")
IF(ENABLE_TEST)
ENABLE_TESTING()
ENDIF(ENABLE_TEST)
IF(WIN32)
- IF(MSVC60)
- SET(WINVER 0x0400)
- ELSE()
- SET(WINVER 0x0500)
- ENDIF()
+ IF(WINDOWS_VERSION STREQUAL "WIN8")
+ SET(WINVER 0x0602)
+ ELSEIF(WINDOWS_VERSION STREQUAL "WIN7")
+ SET(WINVER 0x0601)
+ ELSEIF(WINDOWS_VERSION STREQUAL "WS08")
+ SET(WINVER 0x0600)
+ ELSEIF(WINDOWS_VERSION STREQUAL "VISTA")
+ SET(WINVER 0x0600)
+ ELSEIF(WINDOWS_VERSION STREQUAL "WS03")
+ SET(WINVER 0x0502)
+ ELSE(WINDOWS_VERSION STREQUAL "WIN8")
+ SET(WINVER 0x0501)
+ ENDIF(WINDOWS_VERSION STREQUAL "WIN8")
SET(_WIN32_WINNT ${WINVER})
ENDIF(WIN32)