diff options
author | Leo Yang <lyang@topologyinc.com> | 2015-02-13 17:28:35 -0500 |
---|---|---|
committer | Leo Yang <lyang@topologyinc.com> | 2015-02-17 12:03:25 -0500 |
commit | 2d2aa1ff6e52567d4710af22fdfa11ae54a08420 (patch) | |
tree | e5d96aeeca320da89dde562b19f9bd806499ebde | |
parent | 57f45e7f4dd7202607f51292a816a262622e964c (diff) | |
download | libgit2-2d2aa1ff6e52567d4710af22fdfa11ae54a08420.tar.gz |
Fix Mac build without OpenSSL
If OpenSSL is disabled on Mac the SHA1 implementation goes
to the CommonCrypto from the system. In this case we should
not include the generic hash impl. Otherwise there would be
duplicated impls which fail the build.
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 69ce6fed8..81dc4c24a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,6 @@ OPTION( VALGRIND "Configure build for valgrind" OFF ) IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") SET( USE_ICONV ON ) - ADD_DEFINITIONS(-DGIT_COMMON_CRYPTO) ENDIF() IF(MSVC) @@ -173,6 +172,8 @@ ENDIF() IF (WIN32 AND NOT MINGW AND NOT SHA1_TYPE STREQUAL "builtin") ADD_DEFINITIONS(-DWIN32_SHA1) FILE(GLOB SRC_SHA1 src/hash/hash_win32.c) +ELSEIF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + ADD_DEFINITIONS(-DGIT_COMMON_CRYPTO) ELSEIF (OPENSSL_FOUND AND NOT SHA1_TYPE STREQUAL "builtin") ADD_DEFINITIONS(-DOPENSSL_SHA1) IF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") |