diff options
author | Patrick Steinhardt <ps@pks.im> | 2019-06-27 11:38:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-27 11:38:04 +0200 |
commit | e9102def452d3898058f1da846de9b0047c75048 (patch) | |
tree | bb08994be8e9de275fc222d491647302214d57de /cmake | |
parent | b6625a3b6e322937622625d55cb512e1d0ee384b (diff) | |
parent | b7187ed745a066806881d71d248cca66d7cd3f0a (diff) | |
download | libgit2-e9102def452d3898058f1da846de9b0047c75048.tar.gz |
Merge pull request #4438 from pks-t/pks/hash-algorithm
Multiple hash algorithms
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/SelectHashes.cmake | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cmake/Modules/SelectHashes.cmake b/cmake/Modules/SelectHashes.cmake index 450e2bddb..e6751adbd 100644 --- a/cmake/Modules/SelectHashes.cmake +++ b/cmake/Modules/SelectHashes.cmake @@ -30,7 +30,7 @@ IF(SHA1_BACKEND STREQUAL "CollisionDetection") ADD_DEFINITIONS(-DSHA1DC_NO_STANDARD_INCLUDES=1) ADD_DEFINITIONS(-DSHA1DC_CUSTOM_INCLUDE_SHA1_C=\"common.h\") ADD_DEFINITIONS(-DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C=\"common.h\") - FILE(GLOB SRC_SHA1 hash/hash_collisiondetect.c hash/sha1dc/*) + FILE(GLOB SRC_SHA1 hash/sha1/collisiondetect.c hash/sha1/sha1dc/*) ELSEIF(SHA1_BACKEND STREQUAL "OpenSSL") # OPENSSL_FOUND should already be set, we're checking HTTPS_BACKEND @@ -40,11 +40,13 @@ ELSEIF(SHA1_BACKEND STREQUAL "OpenSSL") ELSE() LIST(APPEND LIBGIT2_PC_REQUIRES "openssl") ENDIF() + FILE(GLOB SRC_SHA1 hash/sha1/openssl.c) ELSEIF(SHA1_BACKEND STREQUAL "CommonCrypto") SET(GIT_SHA1_COMMON_CRYPTO 1) + FILE(GLOB SRC_SHA1 hash/sha1/common_crypto.c) ELSEIF(SHA1_BACKEND STREQUAL "mbedTLS") SET(GIT_SHA1_MBEDTLS 1) - FILE(GLOB SRC_SHA1 hash/hash_mbedtls.c) + FILE(GLOB SRC_SHA1 hash/sha1/mbedtls.c) LIST(APPEND LIBGIT2_SYSTEM_INCLUDES ${MBEDTLS_INCLUDE_DIR}) LIST(APPEND LIBGIT2_LIBS ${MBEDTLS_LIBRARIES}) # mbedTLS has no pkgconfig file, hence we can't require it @@ -53,9 +55,9 @@ ELSEIF(SHA1_BACKEND STREQUAL "mbedTLS") LIST(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES}) ELSEIF(SHA1_BACKEND STREQUAL "Win32") SET(GIT_SHA1_WIN32 1) - FILE(GLOB SRC_SHA1 hash/hash_win32.c) + FILE(GLOB SRC_SHA1 hash/sha1/win32.c) ELSEIF(SHA1_BACKEND STREQUAL "Generic") - FILE(GLOB SRC_SHA1 hash/hash_generic.c) + FILE(GLOB SRC_SHA1 hash/sha1/generic.c) # ELSEIF(NOT USE_SHA1) ELSE() MESSAGE(FATAL_ERROR "Asked for unknown SHA1 backend: ${SHA1_BACKEND}") |