From 0319eb098d704342227efbe4d438234d0d0e62e6 Mon Sep 17 00:00:00 2001 From: Maxim Ivanov Date: Thu, 7 Nov 2024 21:42:04 +0000 Subject: [PATCH] CMAKE: look for pthreads when importing wolfSSL if required All required dependencies of a package must also be found in the package configuration file. Consumers of wolfSSL can't know if it was built with or without threads support. This change adds find_package(Threads) lookup in the file used for find_package(wolfssl) if wolfSSL was built with threads support. --- cmake/Config.cmake.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in index 99d5ed8f0..3b8098b6b 100644 --- a/cmake/Config.cmake.in +++ b/cmake/Config.cmake.in @@ -1,3 +1,9 @@ @PACKAGE_INIT@ +include(CMakeFindDependencyMacro) +if (@HAVE_PTHREAD@) + find_dependency(Threads) +endif() + + include ( "${CMAKE_CURRENT_LIST_DIR}/wolfssl-targets.cmake" )