diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-02-28 20:25:41 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-02-28 20:26:12 -0800 |
| commit | ec9dae9a6fb0670cf83ae5713c8644a81e9e0b77 (patch) | |
| tree | ddec387470832573abdb25281be32697e8914cea /src/supplemental | |
| parent | df20afb04ff9b468b17ab0e1977195820f6f5665 (diff) | |
| download | nng-ec9dae9a6fb0670cf83ae5713c8644a81e9e0b77.tar.gz nng-ec9dae9a6fb0670cf83ae5713c8644a81e9e0b77.tar.bz2 nng-ec9dae9a6fb0670cf83ae5713c8644a81e9e0b77.zip | |
fixes #1771 cmake: respect CMAKE_FIND_PACKAGE_PREFER_CONFIG if present
Diffstat (limited to 'src/supplemental')
| -rw-r--r-- | src/supplemental/tls/mbedtls/CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/supplemental/tls/mbedtls/CMakeLists.txt b/src/supplemental/tls/mbedtls/CMakeLists.txt index e3d767fc..7e24e299 100644 --- a/src/supplemental/tls/mbedtls/CMakeLists.txt +++ b/src/supplemental/tls/mbedtls/CMakeLists.txt @@ -25,12 +25,12 @@ if (NNG_TLS_ENGINE STREQUAL "mbed") else() # We want to prefer config mode over our local find package. # mbedTLS v3 has a config file, which should work better than - # what we do here. We do restore the setting though because - # user applications might not expect this. - if (NOT CMAKE_FIND_PACKAGE_PREFER_CONFIG) + # what we do here. We only make this override locally, to + # 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) - set(CMAKE_FIND_PACKAGE_PREFER_CONFIG FALSE) + unset(CMAKE_FIND_PACKAGE_PREFER_CONFIG) else() find_package(MbedTLS REQUIRED) endif() |
