mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
Generate imported targets for MbedTLS (#7631)
* Generate imported targets for MbedTLS This change allows to use MbedTLS 3.6 config module without significant code alteration which simplifies integration with future versions of MbedTLS. Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com> * Update MBEDTLS_MINIMUM to 2.7 Code expects API from MbedTLS 2.x or later. Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com> --------- Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com>
This commit is contained in:
committed by
GitHub
parent
46cbe2b08f
commit
5180e3b69c
@@ -50,7 +50,7 @@ set(GLIBMM_MINIMUM 2.60.0)
|
||||
set(GTKMM3_MINIMUM 3.24.0)
|
||||
set(GTKMM4_MINIMUM 4.11.1)
|
||||
set(OPENSSL_MINIMUM 1.1.0)
|
||||
set(MBEDTLS_MINIMUM 1.3)
|
||||
set(MBEDTLS_MINIMUM 2.7)
|
||||
set(NPM_MINIMUM 10.2.3) # Node.js 20.10 (eslint-plugin-unicorn)
|
||||
set(PSL_MINIMUM 0.21.1)
|
||||
set(QT_MINIMUM 5.6)
|
||||
@@ -300,8 +300,7 @@ if(WITH_CRYPTO STREQUAL "AUTO" OR WITH_CRYPTO STREQUAL "mbedtls")
|
||||
tr_fixup_list_option(WITH_CRYPTO "mbedtls" MBEDTLS_FOUND "AUTO" MBEDTLS_IS_REQUIRED)
|
||||
if(WITH_CRYPTO STREQUAL "mbedtls")
|
||||
set(CRYPTO_PKG "mbedtls")
|
||||
set(CRYPTO_INCLUDE_DIRS ${MBEDTLS_INCLUDE_DIRS})
|
||||
set(CRYPTO_LIBRARIES ${MBEDTLS_LIBRARIES})
|
||||
set(CRYPTO_LIBRARIES MbedTLS::mbedtls MbedTLS::mbedcrypto)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -43,6 +43,22 @@ find_package_handle_standard_args(MbedTLS
|
||||
MBEDTLS_INCLUDE_DIR
|
||||
VERSION_VAR MBEDTLS_VERSION)
|
||||
|
||||
if(MBEDTLS_LIBRARY AND NOT TARGET MbedTLS::mbedtls)
|
||||
add_library(MbedTLS::mbedtls UNKNOWN IMPORTED)
|
||||
set_target_properties(MbedTLS::mbedtls PROPERTIES
|
||||
IMPORTED_LOCATION ${MBEDTLS_LIBRARY}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${MBEDTLS_INCLUDE_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(MBEDCRYPTO_LIBRARY AND NOT TARGET MbedTLS::mbedcrypto)
|
||||
add_library(MbedTLS::mbedcrypto UNKNOWN IMPORTED)
|
||||
set_target_properties(MbedTLS::mbedcrypto PROPERTIES
|
||||
IMPORTED_LOCATION ${MBEDCRYPTO_LIBRARY}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${MBEDTLS_INCLUDE_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY MBEDCRYPTO_LIBRARY)
|
||||
|
||||
if(MBEDTLS_PREFER_STATIC_LIB)
|
||||
|
||||
Reference in New Issue
Block a user