xiaoxiang781216 commented on code in PR #3540:
URL: https://github.com/apache/nuttx-apps/pull/3540#discussion_r3414502252
##########
netutils/libwebsockets/Make.defs:
##########
@@ -25,7 +25,9 @@ CONFIGURED_APPS += $(APPDIR)/netutils/libwebsockets
# Allows `<libwebsockets/<>.h>` import.
-CFLAGS +=
${INCDIR_PREFIX}$(APPDIR)/netutils/libwebsockets/libwebsockets/include
-CXXFLAGS +=
${INCDIR_PREFIX}$(APPDIR)/netutils/libwebsockets/libwebsockets/include
+CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/netutils/libwebsockets
Review Comment:
ditto
##########
netutils/libwebsockets/CMakeLists.txt:
##########
@@ -178,7 +187,8 @@ if(CONFIG_NETUTILS_LIBWEBSOCKETS)
set_property(
TARGET nuttx
APPEND
- PROPERTY NUTTX_INCLUDE_DIRECTORIES ${LIBWEBSOCKETS_DIR}/include)
+ PROPERTY NUTTX_INCLUDE_DIRECTORIES ${LIBWEBSOCKETS_DIR}/include
+ ${CMAKE_CURRENT_LIST_DIR})
Review Comment:
why expose the internal directory
##########
netutils/libwebsockets/CMakeLists.txt:
##########
@@ -148,20 +165,14 @@ if(CONFIG_NETUTILS_LIBWEBSOCKETS)
if(CONFIG_NETUTILS_LIBWEBSOCKETS_SERVER)
list(APPEND INCDIR ${LIBWEBSOCKETS_DIR}/lib/roles/http/server)
- list(
- APPEND
- CSRCS
- ${LIBWEBSOCKETS_DIR}/lib/roles/ws/server-ws.c
- ${LIBWEBSOCKETS_DIR}/lib/roles/http/server/server.c
- ${LIBWEBSOCKETS_DIR}/lib/roles/listen/ops-listen.c)
Review Comment:
move the style change to previous patch
##########
netutils/libwebsockets/Kconfig:
##########
@@ -16,6 +16,13 @@ config NETUTILS_LIBWEBSOCKETS_VERSION
string "Version number"
default "4.3.1"
+config NETUTILS_LIBWEBSOCKETS_SERVER
+ bool "Enable server support"
+ default y
Review Comment:
should we default to n, or if it doesn't increase the image size, let's
remove the option and compile the server code always.
##########
netutils/libwebsockets/CMakeLists.txt:
##########
@@ -148,20 +165,14 @@ if(CONFIG_NETUTILS_LIBWEBSOCKETS)
if(CONFIG_NETUTILS_LIBWEBSOCKETS_SERVER)
list(APPEND INCDIR ${LIBWEBSOCKETS_DIR}/lib/roles/http/server)
- list(
- APPEND
- CSRCS
- ${LIBWEBSOCKETS_DIR}/lib/roles/ws/server-ws.c
- ${LIBWEBSOCKETS_DIR}/lib/roles/http/server/server.c
- ${LIBWEBSOCKETS_DIR}/lib/roles/listen/ops-listen.c)
+ list(APPEND CSRCS ${LIBWEBSOCKETS_DIR}/lib/roles/ws/server-ws.c
+ ${LIBWEBSOCKETS_DIR}/lib/roles/http/server/server.c
+ ${LIBWEBSOCKETS_DIR}/lib/roles/listen/ops-listen.c)
endif()
if(CONFIG_NETUTILS_LIBWEBSOCKETS_TLS)
- list(
- APPEND
- INCDIR
- ${LIBWEBSOCKETS_DIR}/lib/tls/mbedtls/wrapper/include
- ${LIBWEBSOCKETS_DIR}/lib/tls/mbedtls/wrapper/include/internal)
+ list(APPEND INCDIR ${LIBWEBSOCKETS_DIR}/lib/tls/mbedtls/wrapper/include
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]