summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-11-11 23:09:44 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2021-11-14 07:25:41 -0500
commit2c154145a8f7ce3c01f1afc40e3934c1e43c377e (patch)
tree521194932d773c1644128f3173ccafab3009f3c4 /src
parentc7f6ecb3911b5bc8052428a3605802403c673730 (diff)
downloadlibgit2-2c154145a8f7ce3c01f1afc40e3934c1e43c377e.tar.gz
cmake: move sha1 source selection into CMakeLists.txt
The select hashes module selects the hash; the CMakeLists.txt selects the files to implement it.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b23b6a046..d6a103667 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -97,6 +97,21 @@ include(SelectSSH)
include(SelectWinHTTP)
include(SelectZlib)
+
+if(USE_SHA1 STREQUAL "CollisionDetection")
+ file(GLOB SRC_SHA1 hash/sha1/collisiondetect.* hash/sha1/sha1dc/*)
+elseif(USE_SHA1 STREQUAL "OpenSSL")
+ file(GLOB SRC_SHA1 hash/sha1/openssl.*)
+elseif(USE_SHA1 STREQUAL "CommonCrypto")
+ file(GLOB SRC_SHA1 hash/sha1/common_crypto.*)
+elseif(USE_SHA1 STREQUAL "mbedTLS")
+ file(GLOB SRC_SHA1 hash/sha1/mbedtls.*)
+elseif(USE_SHA1 STREQUAL "Win32")
+ file(GLOB SRC_SHA1 hash/sha1/win32.*)
+elseif(USE_SHA1 STREQUAL "Generic")
+ file(GLOB SRC_SHA1 hash/sha1/generic.*)
+endif()
+list(APPEND SRC_SHA1 "hash/sha1.h")
target_sources(git2internal PRIVATE ${SRC_SHA1})
# Optional external dependency: ntlmclient