Skip to content

Commit

Permalink
Lib preference order now based on whether we're building dynamic or s…
Browse files Browse the repository at this point in the history
…tatic libs.
  • Loading branch information
JonathanHenson authored and raycoll committed Dec 13, 2018
1 parent 1575d94 commit 42e3064
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions cmake/modules/FindLibCrypto.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,23 @@ find_path(LibCrypto_INCLUDE_DIR
HINTS ${CMAKE_INSTALL_PREFIX}/include
)

find_library(LibCrypto_LIBRARY
NAMES libcrypto.so libcrypto.a
HINTS ${CMAKE_INSTALL_PREFIX}/build/crypto
${CMAKE_INSTALL_PREFIX}/build
${CMAKE_INSTALL_PREFIX}
${CMAKE_INSTALL_PREFIX}/lib
)
if (BUILD_SHARED_LIBS)
find_library(LibCrypto_LIBRARY
NAMES libcrypto.so libcrypto.a
HINTS ${CMAKE_INSTALL_PREFIX}/build/crypto
${CMAKE_INSTALL_PREFIX}/build
${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)
Expand Down

0 comments on commit 42e3064

Please sign in to comment.