Skip to content

Commit b89162a

Browse files
committed
Link mbedTLS libraries in when SHA1_BACKEND == "mbedTLS"
1 parent 90c6fb0 commit b89162a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,12 @@ ELSEIF (SHA1_BACKEND STREQUAL "mbedTLS")
285285
ADD_FEATURE_INFO(SHA ON "using mbedTLS")
286286
SET(GIT_SHA1_MBEDTLS 1)
287287
FILE(GLOB SRC_SHA1 hash/hash_mbedtls.c)
288-
LIST(APPEND LIBGIT2_PC_REQUIRES "mbedtls")
288+
LIST(APPEND LIBGIT2_INCLUDES ${MBEDTLS_INCLUDE_DIR})
289+
LIST(APPEND LIBGIT2_LIBS ${MBEDTLS_LIBRARIES})
290+
# mbedTLS has no pkgconfig file, hence we can't require it
291+
# https://github.com/ARMmbed/mbedtls/issues/228
292+
# For now, pass its link flags as our own
293+
LIST(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES})
289294
ELSE()
290295
MESSAGE(FATAL_ERROR "Asked for unknown SHA1 backend ${SHA1_BACKEND}")
291296
ENDIF()

0 commit comments

Comments
 (0)