From 9266cafe8237c5dfd91fcbb9054140d2b25323ca Mon Sep 17 00:00:00 2001 From: Sandro Scherer Date: Sat, 13 Sep 2025 06:51:27 +0200 Subject: [PATCH] cmake: Add OpenSSL dependency check in configuration This enables projects having to only find libcoap in their cmake and not openssl too. --- cmake/Config.cmake.in | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in index 9c15f36a..a7faa72f 100644 --- a/cmake/Config.cmake.in +++ b/cmake/Config.cmake.in @@ -2,3 +2,20 @@ include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") check_required_components("@PROJECT_NAME@") + +include(CMakeFindDependencyMacro) +if (@WITH_GNUTLS@) + find_dependency(GnuTLS) +endif() +if (@WITH_OPENSSL@) + find_dependency(OpenSSL) +endif() +if (@WITH_MBEDTLS@) + find_dependency(MbedTLS) +endif() +if (@WITH_WOLFSSL@) + find_dependency(WolfSSL) +endif() +if (@WITH_TINYDTLS@ AND NOT @USE_VENDORED_TINYDTLS@) + find_dependency(TinyDTLS) +endif()