Further fixes for WITH_TLS=no

This commit is contained in:
Roger A. Light 2026-02-03 11:41:40 +00:00
parent 58ac24b61f
commit aa4bfa68ab
5 changed files with 10 additions and 5 deletions

View file

@ -80,6 +80,9 @@ endif()
option(WITH_WEBSOCKETS "Include websockets support?" ON)
option(WITH_WEBSOCKETS_BUILTIN "Websockets support uses builtin library? Set OFF to use libwebsockets" ON)
if(WITH_WEBSOCKETS AND NOT WITH_TLS)
message(FATAL_ERROR "WITH_WEBSOCKETS support requires WITH_TLS.")
endif()
option(WITH_SRV "Include SRV lookup support?" OFF)
option(WITH_STATIC_LIBRARIES "Build static versions of the libmosquitto/pp libraries?" OFF)
option(WITH_PIC "Build the static library with PIC (Position Independent Code) enabled archives?" OFF)

View file

@ -55,11 +55,7 @@ OBJS_EXTERNAL= \
EXAMPLE_OBJS= example.o
ifeq ($(WITH_TLS),yes)
TARGET:=mosquitto_ctrl mosquitto_ctrl_example.so
else
TARGET:=
endif
all : ${TARGET}

View file

@ -271,7 +271,9 @@ ifeq ($(WITH_UNIX_SOCKETS),yes)
endif
ifeq ($(WITH_WEBSOCKETS),yes)
LOCAL_CPPFLAGS+=-DWITH_WEBSOCKETS=WS_IS_BUILTIN -I${R}/deps/picohttpparser
ifeq ($(WITH_TLS),yes)
LOCAL_CPPFLAGS+=-DWITH_WEBSOCKETS=WS_IS_BUILTIN -I${R}/deps/picohttpparser
endif
endif
ifeq ($(WITH_WEBSOCKETS),lws)

View file

@ -11,6 +11,7 @@
//int mosquitto_base64_decode(const char *in, unsigned char **decoded, unsigned int *decoded_len);
#ifdef WITH_TLS
static void check_encode(const char *input, size_t in_len, const char *expected_output)
{
char *encoded;
@ -159,3 +160,4 @@ int init_base64_tests(void)
return 0;
}
#endif

View file

@ -27,7 +27,9 @@ int main(int argc, char *argv[])
}
if(0
#ifdef WITH_TLS
|| init_base64_tests()
#endif
|| init_file_tests()
|| init_property_add_tests()
|| init_property_value_tests()