Skip to content

Commit

Permalink
* NEW [cmake] Add base64 and scram to cmake.
Browse files Browse the repository at this point in the history
Signed-off-by: wanghaemq <[email protected]>
  • Loading branch information
wanghaEMQ committed Jul 26, 2024
1 parent 9e3ebeb commit dd57c74
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,16 @@ endif ()
if(NNG_ENABLE_QUIC)
set(NNG_PROTO_MQTT_QUIC_CLIENT ON)
add_definitions(-DSUPP_QUIC)
endif()

if (NNG_ENABLE_SCRAM)
add_definitions(-DSUPP_SCRAM)
endif ()

add_subdirectory(src)

if (NNG_TESTS)
add_subdirectory(tests)
add_subdirectory(tests)
endif ()

# Build the tools
Expand Down
6 changes: 6 additions & 0 deletions cmake/NNGOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ else ()
set(NNG_QUIC_LIB none)
endif ()

option(NNG_ENABLE_SCRAM "Enable SCRAM support." OFF)
if (NNG_ENABLE_SCRAM)
set(SUPP_SCRAM ON)
endif ()


# TLS support.

# Enabling TLS is required to enable support for the TLS transport
Expand Down
4 changes: 2 additions & 2 deletions src/supplemental/nanolib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# found online at https://opensource.org/licenses/MIT.
#

nng_sources(file.c log.c)
nng_headers(nng/supplemental/nanolib/file.h nng/supplemental/nanolib/log.h)
nng_sources(file.c log.c base64.c)
nng_headers(nng/supplemental/nanolib/file.h nng/supplemental/nanolib/log.h nng/supplemental/nanolib/base64.h)

0 comments on commit dd57c74

Please sign in to comment.