From 818b5b600578f63de94822ea423dd41a06cf3209 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 1 Jan 2025 15:41:27 -0800 Subject: cmake: ensure that MbedTLS and WolfSSL can be found properly as subprojects Using nng_find_package as the helper fixes this, by ensuring that the dependency gets properly added to incorporating projects. --- src/supplemental/tls/mbedtls/CMakeLists.txt | 6 +++--- src/supplemental/tls/wolfssl/CMakeLists.txt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/supplemental/tls/mbedtls/CMakeLists.txt b/src/supplemental/tls/mbedtls/CMakeLists.txt index 27cf8927..acf852bd 100644 --- a/src/supplemental/tls/mbedtls/CMakeLists.txt +++ b/src/supplemental/tls/mbedtls/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2024 Staysail Systems, Inc. +# Copyright 2025 Staysail Systems, Inc. # # This software is supplied under the terms of the MIT License, a # copy of which should be located in the distribution where this @@ -32,10 +32,10 @@ if (NNG_TLS_ENGINE STREQUAL "mbed") # avoid confounding any other package consumers, and we honor overrides. if (NOT (DEFINED CMAKE_FIND_PACKAGE_PREFER_CONFIG)) set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE) - find_package(MbedTLS REQUIRED) + nng_find_package(MbedTLS) unset(CMAKE_FIND_PACKAGE_PREFER_CONFIG) else() - find_package(MbedTLS REQUIRED) + nng_find_package(MbedTLS) endif() nng_link_libraries_public(MbedTLS::mbedtls MbedTLS::mbedcrypto MbedTLS::mbedx509) endif() diff --git a/src/supplemental/tls/wolfssl/CMakeLists.txt b/src/supplemental/tls/wolfssl/CMakeLists.txt index 897fe929..7b129d9c 100644 --- a/src/supplemental/tls/wolfssl/CMakeLists.txt +++ b/src/supplemental/tls/wolfssl/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2024 Staysail Systems, Inc. +# Copyright 2025 Staysail Systems, Inc. # # This software is supplied under the terms of the MIT License, a # copy of which should be located in the distribution where this @@ -24,10 +24,10 @@ if (NNG_TLS_ENGINE STREQUAL "wolf") # We want to prefer config mode over our local find package. if (NOT (DEFINED CMAKE_FIND_PACKAGE_PREFER_CONFIG)) set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE) - find_package(wolfSSL REQUIRED) + nng_find_package(wolfSSL) unset(CMAKE_FIND_PACKAGE_PREFER_CONFIG) else() - find_package(wolfSSL REQUIRED) + nng_find_package(wolfSSL) endif() nng_link_libraries_public(wolfssl::wolfssl) endif() -- cgit v1.2.3-70-g09d2