mirror of
https://github.com/transmission/transmission
synced 2025-01-01 12:35:22 +00:00
Merge pull request #116 from floppym/mbedcrypto
cmake: link against libmbedcrypto if available
This commit is contained in:
commit
6de89199da
1 changed files with 7 additions and 2 deletions
|
@ -14,9 +14,14 @@ endif()
|
|||
|
||||
find_path(MBEDTLS_INCLUDE_DIR NAMES mbedtls/version.h HINTS ${_MBEDTLS_INCLUDEDIR})
|
||||
find_library(MBEDTLS_LIBRARY NAMES mbedtls HINTS ${_MBEDTLS_LIBDIR})
|
||||
find_library(MBEDCRYPTO_LIBRARY NAMES mbedcrypto HINTS ${_MBEDTLS_LIBDIR})
|
||||
if(MBEDTLS_INCLUDE_DIR AND MBEDTLS_LIBRARY)
|
||||
set(POLARSSL_INCLUDE_DIR ${MBEDTLS_INCLUDE_DIR})
|
||||
set(POLARSSL_LIBRARY ${MBEDTLS_LIBRARY})
|
||||
if(MBEDCRYPTO_LIBRARY)
|
||||
set(POLARSSL_LIBRARY ${MBEDTLS_LIBRARY} ${MBEDCRYPTO_LIBRARY})
|
||||
else()
|
||||
set(POLARSSL_LIBRARY ${MBEDTLS_LIBRARY})
|
||||
endif()
|
||||
set(POLARSSL_VERSION ${_MBEDTLS_VERSION})
|
||||
set(POLARSSL_IS_MBEDTLS ON)
|
||||
else()
|
||||
|
@ -54,7 +59,7 @@ find_package_handle_standard_args(PolarSSL
|
|||
POLARSSL_VERSION
|
||||
)
|
||||
|
||||
mark_as_advanced(MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY POLARSSL_INCLUDE_DIR POLARSSL_LIBRARY)
|
||||
mark_as_advanced(MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY MBEDCRYPTO_LIBRARY POLARSSL_INCLUDE_DIR POLARSSL_LIBRARY)
|
||||
|
||||
if(POLARSSL_PREFER_STATIC_LIB)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${POLARSSL_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
|
|
Loading…
Reference in a new issue