mirror of
https://github.com/falk-werner/webfuse
synced 2024-10-27 20:34:10 +00:00
moved message and message_queue to common library
This commit is contained in:
parent
1976841334
commit
af71bcbff3
@ -17,6 +17,7 @@ set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(C_WARNINGS -Wall -Wextra)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
set(EXTRA_INCLUDE_DIRS
|
||||
"include"
|
||||
@ -40,7 +41,12 @@ set(EXTRA_CFLAGS
|
||||
${JANSSON_CFLAGS_OTHER}
|
||||
"-pthread"
|
||||
)
|
||||
# libwsfs-common
|
||||
|
||||
set(WSFS_COMMON_SOURCES
|
||||
lib/wsfs/message.c
|
||||
lib/wsfs/message_queue.c
|
||||
)
|
||||
|
||||
# libwsfs-adapter
|
||||
|
||||
@ -48,8 +54,6 @@ set(WSFS_ADAPTER_SOURCES
|
||||
lib/wsfs/adapter/status.c
|
||||
lib/wsfs/adapter/filesystem.c
|
||||
lib/wsfs/adapter/server.c
|
||||
lib/wsfs/adapter/message.c
|
||||
lib/wsfs/adapter/message_queue.c
|
||||
lib/wsfs/adapter/time/timepoint.c
|
||||
lib/wsfs/adapter/time/timer.c
|
||||
lib/wsfs/adapter/time/timeout_manager.c
|
||||
@ -68,7 +72,7 @@ set(WSFS_ADAPTER_SOURCES
|
||||
lib/wsfs/adapter/jsonrpc/util.c
|
||||
)
|
||||
|
||||
add_library(wsfs-adapter SHARED ${WSFS_ADAPTER_SOURCES})
|
||||
add_library(wsfs-adapter SHARED ${WSFS_ADAPTER_SOURCES} ${WSFS_COMMON_SOURCES})
|
||||
|
||||
set_target_properties(wsfs-adapter PROPERTIES VERSION ${PROJECT_VERSION})
|
||||
set_target_properties(wsfs-adapter PROPERTIES SOVERSION 0)
|
||||
@ -80,6 +84,7 @@ target_compile_options(wsfs-adapter PUBLIC ${EXTRA_CFLAGS})
|
||||
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/libwsfs-adapter.pc"
|
||||
"prefix=\"${CMAKE_INSTALL_PREFIX}\"
|
||||
|
||||
exec_prefix=\${prefix}
|
||||
libdir=\${exec_prefix}/lib${LIB_SUFFIX}
|
||||
includedir=\${prefix}/include
|
||||
@ -113,7 +118,7 @@ set(WSFS_PROVIDER_SOURCES
|
||||
lib/wsfs/provider/operation/read.c
|
||||
)
|
||||
|
||||
add_library(wsfs-provider SHARED ${WSFS_PROVIDER_SOURCES})
|
||||
add_library(wsfs-provider SHARED ${WSFS_PROVIDER_SOURCES} ${WSFS_COMMON_SOURCES})
|
||||
|
||||
set_target_properties(wsfs-provider PROPERTIES VERSION ${PROJECT_VERSION})
|
||||
set_target_properties(wsfs-provider PROPERTIES SOVERSION 0)
|
||||
@ -194,6 +199,7 @@ add_executable(alltests
|
||||
test/test_timepoint.cc
|
||||
test/test_timer.cc
|
||||
test/test_url.cc
|
||||
${WSFS_COMMON_SOURCES}
|
||||
)
|
||||
|
||||
target_link_libraries(alltests PUBLIC wsfs-adapter-static wsfs-provider-static ${EXTRA_LIBS} ${GTEST_LIBRARIES})
|
||||
|
@ -3,10 +3,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <libwebsockets.h>
|
||||
|
||||
#include "wsfs/adapter/message.h"
|
||||
#include "wsfs/adapter/filesystem.h"
|
||||
#include "wsfs/message.h"
|
||||
#include "wsfs/util.h"
|
||||
|
||||
#include "wsfs/adapter/filesystem.h"
|
||||
|
||||
static int wsfs_server_protocol_callback(
|
||||
struct lws * wsi,
|
||||
enum lws_callback_reasons reason,
|
||||
|
@ -1,9 +1,10 @@
|
||||
#ifndef WSFS_SERVER_PROTOCOL_INTERN_H
|
||||
#define WSFS_SERVER_PROTOCOL_INTERN_H
|
||||
|
||||
#include "wsfs/message_queue.h"
|
||||
|
||||
#include "wsfs/adapter/server_protocol.h"
|
||||
#include "wsfs/adapter/filesystem.h"
|
||||
#include "wsfs/adapter/message_queue.h"
|
||||
#include "wsfs/adapter/jsonrpc/server.h"
|
||||
#include "wsfs/adapter/time/timeout_manager.h"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "wsfs/adapter/message.h"
|
||||
#include "wsfs/message.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <libwebsockets.h>
|
@ -1,5 +1,5 @@
|
||||
#include "wsfs/adapter/message_queue.h"
|
||||
#include "wsfs/adapter/message.h"
|
||||
#include "wsfs/message_queue.h"
|
||||
#include "wsfs/message.h"
|
||||
|
||||
void wsfs_message_queue_init(
|
||||
struct wsfs_message_queue * queue)
|
Loading…
Reference in New Issue
Block a user