From f6a70e2e085b20ba52804e223f3b1d48bd844d65 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 17 May 2021 17:02:07 +0200 Subject: [PATCH] 3rdparty: Fix building with system wolfssl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It only installs a .pc file and nothing cmake, so we can use pkg-config instead. https://github.com/wolfSSL/wolfssl/pull/4043 is required when building wolfssl against gcc 11. Signed-off-by: Emmanuel Gil Peyrot --- 3rdparty/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 58e9a81b2b..a4e18af99f 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -331,10 +331,9 @@ include(llvm.cmake) # WOLFSSL if(USE_SYSTEM_WOLFSSL) message("-- RPCS3: using shared wolfssl") - find_package(WolfSSL REQUIRED) + pkg_check_modules(WolfSSL REQUIRED IMPORTED_TARGET wolfssl>=4.7.0) add_library(wolfssl INTERFACE) - target_link_libraries(wolfssl INTERFACE WolfSSL_LIBRARIES) - target_include_directories(wolfssl INTERFACE WolfSSL_INCLUDE_DIRS) + target_link_libraries(wolfssl INTERFACE PkgConfig::WolfSSL) else() SET(BUILD_TESTS NO CACHE BOOL "Build test applications") add_compile_definitions(HAVE_FFDHE_2048 TFM_TIMING_RESISTANT ECC_TIMING_RESISTANT