Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 81555f5

Browse files
committed
Move USE_MBEDTLS option under not-Darwin condition
Otherwise, Darwin systems would attempt to build with both their native crypto and mbedTLS.
1 parent dab8d43 commit 81555f5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,12 @@ ENDIF()
8989

9090
IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
9191
OPTION( USE_OPENSSL "Link with and use openssl library" ON )
92+
IF (NOT USE_OPENSSL)
93+
OPTION(USE_MBEDTLS "Link with and use mbedTLS library" ON)
94+
ENDIF()
9295
ENDIF()
9396

97+
9498
CHECK_STRUCT_HAS_MEMBER ("struct stat" st_mtim "sys/types.h;sys/stat.h"
9599
HAVE_STRUCT_STAT_ST_MTIM LANGUAGE C)
96100
CHECK_STRUCT_HAS_MEMBER ("struct stat" st_mtimespec "sys/types.h;sys/stat.h"
@@ -112,10 +116,6 @@ IF (HAVE_STRUCT_STAT_NSEC OR WIN32)
112116
OPTION( USE_NSEC "Care about sub-second file mtimes and ctimes" ON )
113117
ENDIF()
114118

115-
IF (NOT USE_OPENSSL)
116-
OPTION( USE_MBEDTLS "Link with and use mbedTLS library" ON )
117-
ENDIF()
118-
119119
# This variable will contain the libraries we need to put into
120120
# libgit2.pc's Requires.private. That is, what we're linking to or
121121
# what someone who's statically linking us needs to link to.

0 commit comments

Comments
 (0)