summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorstaticfloat@gmail.com <staticfloat@gmail.com>2018-06-10 17:26:08 -0700
committerstaticfloat@gmail.com <staticfloat@gmail.com>2018-06-10 17:36:52 -0700
commitb89162af1d45988c7e30f92f00c581f9745343f5 (patch)
treeda923be92b2f53dd18f45bc1bab155e15ad4e76b /src
parent90c6fb0f3eeccb1f93986c9e04346053424f650a (diff)
downloadlibgit2-b89162af1d45988c7e30f92f00c581f9745343f5.tar.gz
Link `mbedTLS` libraries in when `SHA1_BACKEND == "mbedTLS"`
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7bcd51f6b..2deed5f87 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -285,7 +285,12 @@ ELSEIF (SHA1_BACKEND STREQUAL "mbedTLS")
ADD_FEATURE_INFO(SHA ON "using mbedTLS")
SET(GIT_SHA1_MBEDTLS 1)
FILE(GLOB SRC_SHA1 hash/hash_mbedtls.c)
- LIST(APPEND LIBGIT2_PC_REQUIRES "mbedtls")
+ LIST(APPEND LIBGIT2_INCLUDES ${MBEDTLS_INCLUDE_DIR})
+ LIST(APPEND LIBGIT2_LIBS ${MBEDTLS_LIBRARIES})
+ # mbedTLS has no pkgconfig file, hence we can't require it
+ # https://github.com/ARMmbed/mbedtls/issues/228
+ # For now, pass its link flags as our own
+ LIST(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES})
ELSE()
MESSAGE(FATAL_ERROR "Asked for unknown SHA1 backend ${SHA1_BACKEND}")
ENDIF()