option(WITHOUT_TESTAPPS "Don't build the libwebsocket-test-apps" OFF)
option(WITHOUT_CLIENT "Don't build the client part of the library" OFF)
option(WITHOUT_SERVER "Don't build the server part of the library" OFF)
+option(WITHOUT_SERVER_EXTPOLL "Don't build a server version that uses external poll" OFF)
option(WITH_LIBCRYPTO "Use libcrypto MD5 and SHA1 implementations" ON)
option(WITHOUT_PING "Don't build the ping test application" OFF)
option(WITHOUT_DEBUG "Don't compile debug related code" OFF)
#
# Create the lib.
#
-add_library(websocket STATIC
+add_library(websockets STATIC
${HDR_PRIVATE}
${HDR_PUBLIC}
${SOURCES})
message("ZLib include dirs: ${ZLIB_INCLUDE_DIRS}")
message("ZLib libraries: ${ZLIB_LIBRARIES}")
include_directories(${ZLIB_INCLUDE_DIRS})
-target_link_libraries(websocket ${ZLIB_LIBRARIES})
+target_link_libraries(websockets ${ZLIB_LIBRARIES})
#
# OpenSSL
message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
message("OpenSSL libraries: ${OPENSSL_LIBRARIES}")
include_directories(${OPENSSL_INCLUDE_DIR})
- target_link_libraries(websocket ${OPENSSL_LIBRARIES})
+ target_link_libraries(websockets ${OPENSSL_LIBRARIES})
endif(WITH_SSL)
#
# Platform specific libs.
#
if (WIN32)
- target_link_libraries(websocket ws2_32.lib)
+ target_link_libraries(websockets ws2_32.lib)
endif()
if (UNIX)
- target_link_libraries(websocket m)
+ target_link_libraries(websockets m)
endif()
#
source_group("Headers" FILES ${TEST_HDR})
source_group("Sources" FILES ${TEST_SRCS})
add_executable(${TEST_NAME} ${TEST_SRCS} ${TEST_HDR})
- target_link_libraries(${TEST_NAME} websocket)
+ target_link_libraries(${TEST_NAME} websockets)
set_property(
TARGET ${TEST_NAME}
endif(NOT WITHOUT_SERVER)
#
+ # test-server-extpoll
+ #
+ if (NOT WITHOUT_SERVER_EXTPOLL)
+ create_test_app(test-server-extpoll
+ "test-server/test-server.c"
+ ""
+ "${WIN32_HELPERS_PATH}/netdb.h;${WIN32_HELPERS_PATH}/strings.h;${WIN32_HELPERS_PATH}/unistd.h;${WIN32_HELPERS_PATH}/websock-w32.h")
+
+ # Set defines for this executable only.
+ set_property(
+ TARGET test-server-extpoll
+ PROPERTY COMPILE_DEFINITIONS EXTERNAL_POLL INSTALL_DATADIR="${SSL_CERT_DIR}"
+ )
+ endif(NOT WITHOUT_SERVER_EXTPOLL)
+
+ #
# test-fraggle
#
if (NOT WITHOUT_FRAGGLE)
#include <sys/stat.h>
+#ifndef inline
+ #ifdef __inline
+ #define inline __inline
+ #elif defined(__inline__)
+ #define inline __inline__
+ #endif
+#endif
+
#ifdef WIN32
#define LWS_NO_DAEMONIZE
};
#ifndef LWS_LATENCY
-#define lws_latency(context, wsi, action, ret, completion)
-#define lws_latency_pre(context, wsi)
+static void lws_latency(struct libwebsocket_context *context, struct libwebsocket *wsi, const char *action, int ret, int completion) { while (0); }
+static void lws_latency_pre(struct libwebsocket_context *context, struct libwebsocket *wsi) { while (0); }
#else
#define lws_latency_pre(_context, _wsi) lws_latency(_context, _wsi, NULL, 0, 0)
extern void