diff options
Diffstat (limited to 'src/supplemental/tls')
| -rw-r--r-- | src/supplemental/tls/CMakeLists.txt | 11 | ||||
| -rw-r--r-- | src/supplemental/tls/mbedtls/CMakeLists.txt | 12 | ||||
| -rw-r--r-- | src/supplemental/tls/wolfssl/CMakeLists.txt | 8 |
3 files changed, 5 insertions, 26 deletions
diff --git a/src/supplemental/tls/CMakeLists.txt b/src/supplemental/tls/CMakeLists.txt index 61d9f2fb..17d957ff 100644 --- a/src/supplemental/tls/CMakeLists.txt +++ b/src/supplemental/tls/CMakeLists.txt @@ -11,7 +11,6 @@ # found online at https://opensource.org/licenses/MIT. # - if (NNG_ENABLE_TLS) set(NNG_TLS_ENGINES mbed wolf none) # We assume Mbed for now. (Someday replaced perhaps with Bear.) @@ -34,13 +33,3 @@ add_subdirectory(wolfssl) nng_sources(tls_common.c) nng_sources(tls_api.h) - -list(APPEND NNG_DEFS ${_DEFS}) -list(APPEND NNG_SRCS ${_SRCS}) -list(APPEND NNG_LIBS ${_LIBS}) -list(APPEND NNG_INCS ${_INCS}) - -set(NNG_DEFS ${NNG_DEFS} PARENT_SCOPE) -set(NNG_SRCS ${NNG_SRCS} PARENT_SCOPE) -set(NNG_LIBS ${NNG_LIBS} PARENT_SCOPE) -set(NNG_INCS ${NNG_INCS} PARENT_SCOPE) diff --git a/src/supplemental/tls/mbedtls/CMakeLists.txt b/src/supplemental/tls/mbedtls/CMakeLists.txt index 22c8e1c6..a0af30c3 100644 --- a/src/supplemental/tls/mbedtls/CMakeLists.txt +++ b/src/supplemental/tls/mbedtls/CMakeLists.txt @@ -21,16 +21,10 @@ if (NNG_TLS_ENGINE STREQUAL "mbed") # If Mbed TLS was added by a consuming project, then we should use that # instance of it, instead of configuring our own. if (TARGET mbedtls) - set(_LIBS mbedtls) + nng_link_libraries(mbedtls) else() find_package(mbedTLS REQUIRED) - set(_LIBS ${MBEDTLS_LIBRARIES}) - set(_INCS ${MBEDTLS_INCLUDE_DIR}) + nng_link_libraries(${MBEDTLS_LIBRARIES}) + nng_include_directories(${MBEDTLS_INCLUDE_DIR}) endif() - - list(APPEND NNG_LIBS ${_LIBS}) - list(APPEND NNG_INCS ${_INCS}) - - set(NNG_LIBS ${NNG_LIBS} PARENT_SCOPE) - set(NNG_INCS ${NNG_INCS} PARENT_SCOPE) endif() diff --git a/src/supplemental/tls/wolfssl/CMakeLists.txt b/src/supplemental/tls/wolfssl/CMakeLists.txt index f0b48d9a..f38f5dbe 100644 --- a/src/supplemental/tls/wolfssl/CMakeLists.txt +++ b/src/supplemental/tls/wolfssl/CMakeLists.txt @@ -13,14 +13,10 @@ if (NNG_TLS_ENGINE STREQUAL "wolf") add_subdirectory(${PROJECT_SOURCE_DIR}/extern/nng-wolfssl nng-wolfssl) - target_include_directories(nng-wolfssl PRIVATE ) - target_link_libraries(nng PRIVATE nng-wolfssl) - if (TARGET nng_testlib) - target_link_libraries(nng_testlib PRIVATE nng-wolfssl) - endif () + target_include_directories(nng-wolfssl PRIVATE) + nng_check_lib(nng-wolfssl) nng_defines(NNG_TLS_ENGINE_INIT=nng_tls_engine_init_wolf) nng_defines(NNG_TLS_ENGINE_FINI=nng_tls_engine_fini_wolf) nng_defines(NNG_SUPP_TLS) - endif () |
