mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
Make it easy to do add_subdirectory from a parent CMake project.
This commit is contained in:
parent
ad8a5962f3
commit
5122785312
2 changed files with 8 additions and 0 deletions
|
@ -752,6 +752,7 @@ export(PACKAGE libwebsockets)
|
||||||
set(LWS__INCLUDE_DIRS
|
set(LWS__INCLUDE_DIRS
|
||||||
"${PROJECT_SOURCE_DIR}/lib"
|
"${PROJECT_SOURCE_DIR}/lib"
|
||||||
"${PROJECT_BINARY_DIR}")
|
"${PROJECT_BINARY_DIR}")
|
||||||
|
set(LIBWEBSOCKETS_INCLUDE_DIRS ${LWS__INCLUDE_DIRS} CACHE PATH "Libwebsockets include directories")
|
||||||
configure_file(${PROJECT_SOURCE_DIR}/cmake/LibwebsocketsConfig.cmake.in
|
configure_file(${PROJECT_SOURCE_DIR}/cmake/LibwebsocketsConfig.cmake.in
|
||||||
${PROJECT_BINARY_DIR}/LibwebsocketsConfig.cmake
|
${PROJECT_BINARY_DIR}/LibwebsocketsConfig.cmake
|
||||||
@ONLY)
|
@ONLY)
|
||||||
|
@ -849,5 +850,10 @@ message(" LWS_WITH_LATENCY = ${LWS_WITH_LATENCY}")
|
||||||
message(" LWS_WITHOUT_DAEMONIZE = ${LWS_WITHOUT_DAEMONIZE}")
|
message(" LWS_WITHOUT_DAEMONIZE = ${LWS_WITHOUT_DAEMONIZE}")
|
||||||
message("---------------------------------------------------------------------")
|
message("---------------------------------------------------------------------")
|
||||||
|
|
||||||
|
# These will be available to parent projects including libwebsockets using add_subdirectory()
|
||||||
|
set(LIBWEBSOCKETS_LIBRARIES websocket websockets_shared CACHE STRING "Libwebsocket libraries")
|
||||||
|
set(LIBWEBSOCKETS_LIBRARIES_STATIC websocket CACHE STRING "Libwebsocket static library")
|
||||||
|
set(LIBWEBSOCKETS_LIBRARIES_SHARED websockets_shared CACHE STRING "Libwebsocket shared library")
|
||||||
|
|
||||||
# This must always be last!
|
# This must always be last!
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
|
|
@ -65,7 +65,9 @@ typedef SSIZE_T ssize_t;
|
||||||
#else // NOT WIN32
|
#else // NOT WIN32
|
||||||
|
|
||||||
/* to get ppoll() */
|
/* to get ppoll() */
|
||||||
|
#ifndef __USE_GNU
|
||||||
#define __USE_GNU
|
#define __USE_GNU
|
||||||
|
#endif
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue