cmake: Add OpenSSL dependency check in configuration

This enables projects having to
only find libcoap in their cmake
and not openssl too.
This commit is contained in:
Sandro Scherer authored and Jon Shallow committed 2025-09-15 10:18:14 +01:00
1 parent 5aee88f186
commit 9266cafe82
1 file changed
+17
+17
View File
@@ -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()