]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Only look for libmd if OpenSSL is not present.
authorTim Kientzle <kientzle@acm.org>
Mon, 2 Apr 2012 04:06:23 +0000 (21:06 -0700)
committerTim Kientzle <kientzle@acm.org>
Mon, 2 Apr 2012 04:06:23 +0000 (21:06 -0700)
In particular, this prevents us from trying to link
both on FreeBSD.

CMakeLists.txt

index 1940384e68a04bfe92369be6374f8ea72fc944ef..58b2b36671fa916bf41b55b1e077c0167b289b36 100644 (file)
@@ -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