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.
pull/8162/head
Maxim Ivanov 2024-11-07 21:42:04 +00:00
parent c577ad78df
commit 0319eb098d
1 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,9 @@
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
if (@HAVE_PTHREAD@)
find_dependency(Threads)
endif()
include ( "${CMAKE_CURRENT_LIST_DIR}/wolfssl-targets.cmake" )