@@ -24,7 +24,6 @@ if(USE_SHA1 STREQUAL "CollisionDetection")
2424 add_definitions (-DSHA1DC_NO_STANDARD_INCLUDES=1)
2525 add_definitions (-DSHA1DC_CUSTOM_INCLUDE_SHA1_C=\"common.h\")
2626 add_definitions (-DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C=\"common.h\")
27- file (GLOB SRC_SHA1 hash/sha1/collisiondetect.* hash/sha1/sha1dc/*)
2827elseif (USE_SHA1 STREQUAL "OpenSSL" )
2928 # OPENSSL_FOUND should already be set, we're checking USE_HTTPS
3029
@@ -34,29 +33,20 @@ elseif(USE_SHA1 STREQUAL "OpenSSL")
3433 else ()
3534 list (APPEND LIBGIT2_PC_REQUIRES "openssl" )
3635 endif ()
37- file (GLOB SRC_SHA1 hash/sha1/openssl.*)
3836elseif (USE_SHA1 STREQUAL "CommonCrypto" )
3937 set (GIT_SHA1_COMMON_CRYPTO 1)
40- file (GLOB SRC_SHA1 hash/sha1/common_crypto.*)
4138elseif (USE_SHA1 STREQUAL "mbedTLS" )
4239 set (GIT_SHA1_MBEDTLS 1)
43- file (GLOB SRC_SHA1 hash/sha1/mbedtls.*)
4440 list (APPEND LIBGIT2_SYSTEM_INCLUDES ${MBEDTLS_INCLUDE_DIR} )
45- list (APPEND LIBGIT2_LIBS ${MBEDTLS_LIBRARIES} )
41+ list (APPEND LIBGIT2_SYSTEM_LIBS ${MBEDTLS_LIBRARIES} )
4642 # mbedTLS has no pkgconfig file, hence we can't require it
4743 # https://github.com/ARMmbed/mbedtls/issues/228
4844 # For now, pass its link flags as our own
4945 list (APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES} )
5046elseif (USE_SHA1 STREQUAL "Win32" )
5147 set (GIT_SHA1_WIN32 1)
52- file (GLOB SRC_SHA1 hash/sha1/win32 .*)
53- elseif (USE_SHA1 STREQUAL "Generic" )
54- file (GLOB SRC_SHA1 hash/sha1/generic.*)
55- else ()
48+ elseif (NOT (USE_SHA1 STREQUAL "Generic" ))
5649 message (FATAL_ERROR "Asked for unknown SHA1 backend: ${USE_SHA1} " )
5750endif ()
5851
59- list (APPEND SRC_SHA1 "hash/sha1.h" )
60- list (SORT SRC_SHA1)
61-
6252add_feature_info(SHA ON "using ${USE_SHA1} " )
0 commit comments