Commit 36ae5c9330cf2ba22c3c6075752605a712755b60

Patrick Steinhardt 2018-05-30T08:25:19

Merge pull request #4656 from tiennou/fix/mbedtls-no-pkgconfig mbedtls: don't require mbedtls from our pkgconfig file

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d447ac5..2b82bb3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -232,8 +232,10 @@ IF (USE_HTTPS)
 		SET(GIT_MBEDTLS 1)
 		LIST(APPEND LIBGIT2_INCLUDES ${MBEDTLS_INCLUDE_DIR})
 		LIST(APPEND LIBGIT2_LIBS ${MBEDTLS_LIBRARIES})
-		LIST(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LDFLAGS})
-		LIST(APPEND LIBGIT2_PC_REQUIRES "mbedtls")
+		# 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})
 	ELSEIF (HTTPS_BACKEND STREQUAL "WinHTTP")
 		# WinHTTP setup was handled in the WinHTTP-specific block above
 	ELSE()