build(externals): move to MbedTLS upstream 2.28.1

The latest LTS release now includes the changes of the yuzu-emu fork,
so we can now directly use the upstream version instead.
This commit is contained in:
Andrea Pappacoda
2022-07-22 17:42:50 +02:00
parent caa25146f2
commit 70f7ff3db5
3 changed files with 11 additions and 2 deletions

2
.gitmodules vendored
View File

@@ -30,7 +30,7 @@
url = https://github.com/yuzu-emu/sirit
[submodule "mbedtls"]
path = externals/mbedtls
url = https://github.com/yuzu-emu/mbedtls
url = https://github.com/Mbed-TLS/mbedtls
[submodule "xbyak"]
path = externals/xbyak
url = https://github.com/herumi/xbyak.git

View File

@@ -34,6 +34,15 @@ endif()
find_package(MbedTLS 2.16)
if(NOT MbedTLS_FOUND)
message(STATUS "MbedTLS not found, falling back to externals")
set(ENABLE_PROGRAMS OFF CACHE BOOL "")
set(ENABLE_TESTING OFF CACHE BOOL "")
# Edit MbedTLS config header to enable CMAC
file(READ "./mbedtls/include/mbedtls/config.h" MbedTLS_CONFIG_FILE)
string(REPLACE "//#define MBEDTLS_CMAC_C" "#define MBEDTLS_CMAC_C" MbedTLS_CONFIG_FILE_CMAC "${MbedTLS_CONFIG_FILE}")
file(WRITE "./mbedtls/include/mbedtls/config.h" "${MbedTLS_CONFIG_FILE_CMAC}")
add_subdirectory(mbedtls EXCLUDE_FROM_ALL)
target_include_directories(mbedcrypto PUBLIC ./mbedtls/include)
add_library(MbedTLS::mbedcrypto ALIAS mbedcrypto)