diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-01-01 15:41:27 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-01-01 15:41:27 -0800 |
| commit | 818b5b600578f63de94822ea423dd41a06cf3209 (patch) | |
| tree | 0760c7d2fbaada505f0a8238c92ee2d5587518ae | |
| parent | 46117f86d47da376b37c6fb4d72ee202de599c9b (diff) | |
| download | nng-818b5b600578f63de94822ea423dd41a06cf3209.tar.gz nng-818b5b600578f63de94822ea423dd41a06cf3209.tar.bz2 nng-818b5b600578f63de94822ea423dd41a06cf3209.zip | |
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.
| -rw-r--r-- | src/supplemental/tls/mbedtls/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | 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. <info@staysail.tech> +# Copyright 2025 Staysail Systems, Inc. <info@staysail.tech> # # 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. <info@staysail.tech> +# Copyright 2025 Staysail Systems, Inc. <info@staysail.tech> # # 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() |
