1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

static build: lwsws

This commit is contained in:
Andy Green 2020-09-01 07:44:54 +01:00
parent 4ae3ef51c1
commit c3dee88156
3 changed files with 17 additions and 2 deletions

View file

@ -390,6 +390,12 @@ endif()
if (NOT LWS_WITH_SSL)
set(LWS_WITHOUT_BUILTIN_SHA1 OFF)
endif()
# protocol plugins dont make any sense either
if (LWS_WITH_PLUGINS AND NOT LWS_WITH_SHARED)
message("Deselecting PLUGINS since building static")
set(LWS_WITH_PLUGINS 0)
endif()
if (LWS_WITH_PLUGINS OR (LWS_WITH_EVLIB_PLUGINS AND LWS_WITH_EVENT_LIBS))
set(LWS_WITH_PLUGINS_API 1)

View file

@ -44,8 +44,13 @@ if (LWS_WITH_LWSWS)
source_group("Sources" FILES ${LWSWS_SRCS})
add_executable("lwsws" ${LWSWS_SRCS} ${LWSWS_HDR})
target_link_libraries("lwsws" websockets_shared ${LIB_LIST_AT_END})
add_dependencies("lwsws" websockets_shared)
if (LWS_WITH_SHARED)
target_link_libraries("lwsws" websockets_shared ${LIB_LIST_AT_END})
add_dependencies("lwsws" websockets_shared)
else()
target_link_libraries("lwsws" websockets ${LIB_LIST_AT_END})
add_dependencies("lwsws" websockets)
endif()
target_include_directories("lwsws" PRIVATE "${LWS_LIB_INCLUDES}" ${LWS_LIB_BUILD_INC_PATHS})
# Set test app specific defines.

View file

@ -77,10 +77,12 @@ static const struct lws_extension exts[] = {
{ NULL, NULL, NULL /* terminator */ }
};
#if defined(LWS_WITH_PLUGINS)
static const char * const plugin_dirs[] = {
INSTALL_DATADIR"/libwebsockets-test-server/plugins/",
NULL
};
#endif
#if defined(LWS_HAS_GETOPT_LONG) || defined(WIN32)
static struct option options[] = {
@ -150,7 +152,9 @@ context_creation(void)
LWS_SERVER_OPTION_EXPLICIT_VHOSTS |
LWS_SERVER_OPTION_LIBUV;
#if defined(LWS_WITH_PLUGINS)
info.plugin_dirs = plugin_dirs;
#endif
lwsl_notice("Using config dir: \"%s\"\n", config_dir);
/*