Mac build: don't force link against OpenSSL

libgit2 uses native SSL / crypto on Darwin/macOS.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-10-23 11:47:33 -04:00
parent 344d976593
commit d839392bb6

View file

@ -37,7 +37,11 @@ HINTS
/usr/local/include
/usr/include
)
SET(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} -lssl -lcrypto)
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
SET(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES})
else()
SET(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} -lssl -lcrypto)
endif()
INCLUDE( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( git2 DEFAULT_MSG LIBGIT2_INCLUDE_DIR LIBGIT2_LIBRARIES )