aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-12-28 20:52:15 -0800
committerGarrett D'Amore <garrett@damore.org>2017-12-28 20:52:15 -0800
commit63e0baf37c8024174aa4bacb12dccc7040de74d8 (patch)
treedadbaa4a7f7d026af16674e85b67d6aff3613746 /src
parentcbc21ab0a2e11c8be23dfa146adf7bb091c97f71 (diff)
downloadnng-63e0baf37c8024174aa4bacb12dccc7040de74d8.tar.gz
nng-63e0baf37c8024174aa4bacb12dccc7040de74d8.tar.bz2
nng-63e0baf37c8024174aa4bacb12dccc7040de74d8.zip
fixes #172 HTTP and websocket need better conditional inclusion
Diffstat (limited to 'src')
-rw-r--r--src/supplemental/base64/CMakeLists.txt6
-rw-r--r--src/supplemental/http/CMakeLists.txt2
-rw-r--r--src/supplemental/sha1/CMakeLists.txt6
-rw-r--r--src/supplemental/websocket/CMakeLists.txt8
-rw-r--r--src/transport/ws/websocket.c1
5 files changed, 17 insertions, 6 deletions
diff --git a/src/supplemental/base64/CMakeLists.txt b/src/supplemental/base64/CMakeLists.txt
index 3ccac7ff..297a5478 100644
--- a/src/supplemental/base64/CMakeLists.txt
+++ b/src/supplemental/base64/CMakeLists.txt
@@ -8,5 +8,9 @@
# found online at https://opensource.org/licenses/MIT.
#
-set(BASE64_SOURCES supplemental/base64/base64.c supplemental/base64/base64.h)
+if (NNG_SUPP_BASE64)
+ set(BASE64_SOURCES
+ supplemental/base64/base64.c
+ supplemental/base64/base64.h)
+endif()
set(NNG_SOURCES ${NNG_SOURCES} ${BASE64_SOURCES} PARENT_SCOPE)
diff --git a/src/supplemental/http/CMakeLists.txt b/src/supplemental/http/CMakeLists.txt
index dff06d70..2c8d6a68 100644
--- a/src/supplemental/http/CMakeLists.txt
+++ b/src/supplemental/http/CMakeLists.txt
@@ -8,10 +8,12 @@
# found online at https://opensource.org/licenses/MIT.
#
+if (NNG_SUPP_HTTP)
set(HTTP_SOURCES
supplemental/http/http.c
supplemental/http/http_msg.c
supplemental/http/server.c
supplemental/http/client.c
supplemental/http/http.h)
+endif()
set(NNG_SOURCES ${NNG_SOURCES} ${HTTP_SOURCES} PARENT_SCOPE)
diff --git a/src/supplemental/sha1/CMakeLists.txt b/src/supplemental/sha1/CMakeLists.txt
index 8496777b..9600a268 100644
--- a/src/supplemental/sha1/CMakeLists.txt
+++ b/src/supplemental/sha1/CMakeLists.txt
@@ -8,5 +8,9 @@
# found online at https://opensource.org/licenses/MIT.
#
-set(SHA1_SOURCES supplemental/sha1/sha1.c supplemental/sha1/sha1.h)
+if (NNG_SUPP_SHA1)
+ set(SHA1_SOURCES
+ supplemental/sha1/sha1.c
+ supplemental/sha1/sha1.h)
+endif()
set(NNG_SOURCES ${NNG_SOURCES} ${SHA1_SOURCES} PARENT_SCOPE)
diff --git a/src/supplemental/websocket/CMakeLists.txt b/src/supplemental/websocket/CMakeLists.txt
index f3283257..5ddd6cb1 100644
--- a/src/supplemental/websocket/CMakeLists.txt
+++ b/src/supplemental/websocket/CMakeLists.txt
@@ -8,7 +8,9 @@
# found online at https://opensource.org/licenses/MIT.
#
-set(WEBSOCKET_SOURCES
- supplemental/websocket/websocket.c
- supplemental/websocket/websocket.h)
+if (NNG_SUPP_WEBSOCKET)
+ set(WEBSOCKET_SOURCES
+ supplemental/websocket/websocket.c
+ supplemental/websocket/websocket.h)
+endif()
set(NNG_SOURCES ${NNG_SOURCES} ${WEBSOCKET_SOURCES} PARENT_SCOPE)
diff --git a/src/transport/ws/websocket.c b/src/transport/ws/websocket.c
index c6ce9b25..4f948fb7 100644
--- a/src/transport/ws/websocket.c
+++ b/src/transport/ws/websocket.c
@@ -532,7 +532,6 @@ static nni_tran_pipe_option ws_pipe_options[] = {
{ NNG_OPT_REMADDR, ws_pipe_getopt_remaddr },
{ NNG_OPT_WS_REQUEST_HEADERS, ws_pipe_getopt_reqhdrs },
{ NNG_OPT_WS_RESPONSE_HEADERS, ws_pipe_getopt_reshdrs },
-
// clang-format on
// terminate list