From: Tim Kientzle Date: Mon, 2 Apr 2012 04:06:23 +0000 (-0700) Subject: Only look for libmd if OpenSSL is not present. X-Git-Tag: v3.1.0~102 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=90b09bbfe6f0baab106fc94623eec08c4a08c10c;p=thirdparty%2Flibarchive.git Only look for libmd if OpenSSL is not present. In particular, this prevents us from trying to link both on FreeBSD. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 1940384e6..58b2b3667 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -487,14 +487,16 @@ ELSE() ENDIF() # FreeBSD libmd -CHECK_LIBRARY_EXISTS(md "MD5Init" "" LIBMD_FOUND) -IF(LIBMD_FOUND) - CMAKE_PUSH_CHECK_STATE() # Save the state of the variables - SET(CMAKE_REQUIRED_LIBRARIES "md") - FIND_LIBRARY(LIBMD_LIBRARY NAMES md) - LIST(APPEND ADDITIONAL_LIBS ${LIBMD_LIBRARY}) - CMAKE_POP_CHECK_STATE() # Restore the state of the variables -ENDIF(LIBMD_FOUND) +IF(NOT OPENSSL_FOUND) + CHECK_LIBRARY_EXISTS(md "MD5Init" "" LIBMD_FOUND) + IF(LIBMD_FOUND) + CMAKE_PUSH_CHECK_STATE() # Save the state of the variables + SET(CMAKE_REQUIRED_LIBRARIES "md") + FIND_LIBRARY(LIBMD_LIBRARY NAMES md) + LIST(APPEND ADDITIONAL_LIBS ${LIBMD_LIBRARY}) + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + ENDIF(LIBMD_FOUND) +ENDIF(NOT OPENSSL_FOUND) # # How to prove that CRYPTO functions, which have several names on various