Skip to content
Snippets Groups Projects
Commit e9a42119 authored by Joakim Söderberg's avatar Joakim Söderberg Committed by Andy Green
Browse files

Added some minor changes to CMake build file.

- Added options for compiling without server/client parts.
- Fixed a syntax error on printing an error on CyaSSL compilation.
- Don't compile server-extpoll either when the server isn't compiled.
parent b378ce9d
Branches
Tags
No related merge requests found
...@@ -60,7 +60,7 @@ set(CYASSL_INCLUDE_DIRS CACHE STRING "") ...@@ -60,7 +60,7 @@ set(CYASSL_INCLUDE_DIRS CACHE STRING "")
if (USE_CYASSL) if (USE_CYASSL)
if ("${CYASSL_LIB}" STREQUAL "" OR "${CYASSL_INCLUDE_DIRS}" STREQUAL "") if ("${CYASSL_LIB}" STREQUAL "" OR "${CYASSL_INCLUDE_DIRS}" STREQUAL "")
error("You must set CYASSL_LIB and CYASSL_INCLUDE_DIRS when USE_CYASSL is turned on") message(FATAL_ERROR "You must set CYASSL_LIB and CYASSL_INCLUDE_DIRS when USE_CYASSL is turned on")
endif() endif()
endif() endif()
...@@ -80,6 +80,14 @@ if (WITHOUT_DAEMONIZE) ...@@ -80,6 +80,14 @@ if (WITHOUT_DAEMONIZE)
set(LWS_NO_DAEMONIZE 1) set(LWS_NO_DAEMONIZE 1)
endif() endif()
if (WITHOUT_SERVER)
set(LWS_NO_SERVER 1)
endif()
if (WITHOUT_CLIENT)
set(LWS_NO_CLIENT 1)
endif()
if (MINGW) if (MINGW)
set(LWS_MINGW_SUPPORT 1) set(LWS_MINGW_SUPPORT 1)
endif() endif()
...@@ -380,8 +388,6 @@ if (NOT WITHOUT_TESTAPPS) ...@@ -380,8 +388,6 @@ if (NOT WITHOUT_TESTAPPS)
TARGET ${TEST_NAME} TARGET ${TEST_NAME}
PROPERTY COMPILE_DEFINITIONS INSTALL_DATADIR="${SSL_CERT_DIR}" PROPERTY COMPILE_DEFINITIONS INSTALL_DATADIR="${SSL_CERT_DIR}"
) )
endfunction() endfunction()
# #
...@@ -392,7 +398,7 @@ if (NOT WITHOUT_TESTAPPS) ...@@ -392,7 +398,7 @@ if (NOT WITHOUT_TESTAPPS)
"test-server/test-client.c" "test-server/test-client.c"
"" ""
"") "")
endif(NOT WITHOUT_CLIENT) endif()
# #
# test-server # test-server
...@@ -402,12 +408,12 @@ if (NOT WITHOUT_TESTAPPS) ...@@ -402,12 +408,12 @@ if (NOT WITHOUT_TESTAPPS)
"test-server/test-server.c" "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") "${WIN32_HELPERS_PATH}/netdb.h;${WIN32_HELPERS_PATH}/strings.h;${WIN32_HELPERS_PATH}/unistd.h;${WIN32_HELPERS_PATH}/websock-w32.h")
endif(NOT WITHOUT_SERVER) endif()
# #
# test-server-extpoll # test-server-extpoll
# #
if (NOT WITHOUT_SERVER_EXTPOLL) if (NOT WITHOUT_SERVER AND NOT WITHOUT_SERVER_EXTPOLL)
create_test_app(test-server-extpoll create_test_app(test-server-extpoll
"test-server/test-server.c" "test-server/test-server.c"
"" ""
...@@ -418,7 +424,7 @@ if (NOT WITHOUT_TESTAPPS) ...@@ -418,7 +424,7 @@ if (NOT WITHOUT_TESTAPPS)
TARGET test-server-extpoll TARGET test-server-extpoll
PROPERTY COMPILE_DEFINITIONS EXTERNAL_POLL INSTALL_DATADIR="${SSL_CERT_DIR}" PROPERTY COMPILE_DEFINITIONS EXTERNAL_POLL INSTALL_DATADIR="${SSL_CERT_DIR}"
) )
endif(NOT WITHOUT_SERVER_EXTPOLL) endif()
# #
# test-fraggle # test-fraggle
...@@ -428,7 +434,7 @@ if (NOT WITHOUT_TESTAPPS) ...@@ -428,7 +434,7 @@ if (NOT WITHOUT_TESTAPPS)
"test-server/test-fraggle.c" "test-server/test-fraggle.c"
"" ""
"${WIN32_HELPERS_PATH}/unistd.h;${WIN32_HELPERS_PATH}/sys/time.h") "${WIN32_HELPERS_PATH}/unistd.h;${WIN32_HELPERS_PATH}/sys/time.h")
endif(NOT WITHOUT_FRAGGLE) endif()
# #
# test-ping # test-ping
...@@ -438,7 +444,7 @@ if (NOT WITHOUT_TESTAPPS) ...@@ -438,7 +444,7 @@ if (NOT WITHOUT_TESTAPPS)
"test-server/test-ping.c" "test-server/test-ping.c"
"" ""
"${WIN32_HELPERS_PATH}/unistd.h;${WIN32_HELPERS_PATH}/sys/time.h") "${WIN32_HELPERS_PATH}/unistd.h;${WIN32_HELPERS_PATH}/sys/time.h")
endif(NOT WITHOUT_PING) endif()
# #
# Copy OpenSSL dlls to the output directory on Windows. # Copy OpenSSL dlls to the output directory on Windows.
......
...@@ -25,6 +25,12 @@ ...@@ -25,6 +25,12 @@
/* Don't build the daemonizeation api */ /* Don't build the daemonizeation api */
#cmakedefine LWS_NO_DAEMONIZE #cmakedefine LWS_NO_DAEMONIZE
/* Build without server support */
#cmakedefine LWS_NO_SERVER
/* Build without client support */
#cmakedefine LWS_NO_CLIENT
/* If we should compile with MinGW support */ /* If we should compile with MinGW support */
#cmakedefine LWS_MINGW_SUPPORT #cmakedefine LWS_MINGW_SUPPORT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment