summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2012-11-05 12:37:15 -0600
committerEdward Thomson <ethomson@edwardthomson.com>2012-11-13 10:23:05 -0600
commitd6fb09240913c9756de5f4a2462062008ebac252 (patch)
treec4a99509abd1dffdcd52353d551089f257b54c1e /CMakeLists.txt
parente45423dd2c5ef8262f70605b81c6da0751d000a3 (diff)
downloadlibgit2-d6fb09240913c9756de5f4a2462062008ebac252.tar.gz
Win32 CryptoAPI and CNG support for SHA1
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 8 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 85f86c00b..bde872fe4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,11 +39,14 @@ ENDIF()
# Specify sha1 implementation
IF (SHA1_TYPE STREQUAL "ppc")
ADD_DEFINITIONS(-DPPC_SHA1)
- FILE(GLOB SRC_SHA1 src/ppc/*.c src/ppc/*.S)
-ELSEIF (OPENSSL_FOUND) # libcrypto's implementation is faster than ours
- ADD_DEFINITIONS(-DOPENSSL_SHA)
-ELSE ()
- FILE(GLOB SRC_SHA1 src/sha1/*.c)
+ FILE(GLOB SRC_SHA1 src/hash/hash_ppc.c src/hash/hash_ppc_core.S)
+ELSEIF (WIN32 AND NOT MINGW AND NOT SHA1_TYPE STREQUAL "builtin")
+ ADD_DEFINITIONS(-DWIN32_SHA1)
+ FILE(GLOB SRC_SHA1 src/hash/hash_win32.c)
+ELSEIF (OPENSSL_FOUND AND NOT SHA1_TYPE STREQUAL "builtin")
+ ADD_DEFINITIONS(-DOPENSSL_SHA1)
+ELSE()
+ FILE(GLOB SRC_SHA1 src/hash/hash_generic.c)
ENDIF()
IF (NOT WIN32)