Lib preference order now based on whether we're building dynamic or static libs.
@@ -17,6 +17,7 @@ find_path(LibCrypto_INCLUDE_DIR
HINTS ${CMAKE_INSTALL_PREFIX}/include
)
+if (BUILD_SHARED_LIBS)
find_library(LibCrypto_LIBRARY
NAMES libcrypto.so libcrypto.a
HINTS ${CMAKE_INSTALL_PREFIX}/build/crypto
@@ -24,6 +25,15 @@ find_library(LibCrypto_LIBRARY
${CMAKE_INSTALL_PREFIX}
${CMAKE_INSTALL_PREFIX}/lib
)
+else()
+ find_library(LibCrypto_LIBRARY
+ NAMES libcrypto.a libcrypto.so
+ HINTS ${CMAKE_INSTALL_PREFIX}/build/crypto
+ ${CMAKE_INSTALL_PREFIX}/build
+ ${CMAKE_INSTALL_PREFIX}
+ ${CMAKE_INSTALL_PREFIX}/lib
+ )
+endif()
include(FindPackageHandleStandardArgs)
