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

cmake: copy include/libwebsockets into the build dir

https://libwebsockets.org/pipermail/libwebsockets/2018-November/007745.html

This allows user code to use the build dir ./include without
having to do the make install, as a convenience.
This commit is contained in:
Andy Green 2018-11-23 08:54:40 +08:00
parent 9bed6d6fc6
commit 37d6116374
2 changed files with 15 additions and 2 deletions

View file

@ -1278,6 +1278,13 @@ if (LWS_WITH_STATIC)
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/include/libwebsockets.h
${CMAKE_CURRENT_BINARY_DIR}/include/libwebsockets.h
)
add_custom_command(
TARGET websockets
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/include/libwebsockets/
${CMAKE_CURRENT_BINARY_DIR}/include/libwebsockets
)
add_custom_command(
TARGET websockets
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/lws_config.h
@ -1318,6 +1325,13 @@ if (LWS_WITH_SHARED)
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/include/libwebsockets.h
${CMAKE_CURRENT_BINARY_DIR}/include/libwebsockets.h
)
add_custom_command(
TARGET websockets
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/include/libwebsockets
${CMAKE_CURRENT_BINARY_DIR}/include/libwebsockets
)
add_custom_command(
TARGET websockets_shared
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/lws_config.h

View file

@ -305,8 +305,7 @@ Clients with limited storage and RAM will find this useful; the memory needed
for the inflate case is constrained so that only one input buffer at a time
is ever in memory.
To use this feature, ensure LWS_WITH_ZIP_FOPS is enabled at CMake (it is by
default).
To use this feature, ensure LWS_WITH_ZIP_FOPS is enabled at CMake.
`libwebsockets-test-server-v2.0` includes a mount using this technology
already, run that test server and navigate to http://localhost:7681/ziptest/candide.html