From 3414a407f12677845087571c59713182a9b21d05 Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期五, 26 二月 2021 14:25:13 +0800 Subject: [PATCH] update --- src/CMakeLists.txt | 32 ++++++++++++++++++++------------ 1 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f3698d9..9026d92 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,15 +5,14 @@ # to the source code configure_file(bus_config.h.in bus_config.h) -add_library(shm_queue - ./logger_factory.cpp + +list(APPEND _SOURCES_ +./logger_factory.cpp ./socket/bus_server_socket.cpp ./socket/bus_server_socket_wrapper.cpp -./socket/shm_stream_mod_socket.cpp ./socket/shm_socket.cpp ./socket/shm_mod_socket.cpp ./time_util.cpp -./psem.cpp ./bus_error.cpp ./futex_sem.cpp ./svsem.cpp @@ -26,12 +25,20 @@ ./shm/shm_mm_wrapper.cpp ./shm/mm.cpp ./shm/hashtable.cpp +./shm/shm_mm.cpp - ) +) -target_include_directories(shm_queue PUBLIC - ${EXTRA_INCLUDES} - ) +if (BUILD_SHARED_LIBS) + add_library(shm_queue SHARED ${_SOURCES_}) +else() + add_library(shm_queue STATIC ${_SOURCES_}) +endif() + +# STATIC SHARED +# add_library(shm_queue ${_SOURCES_}) + +target_include_directories(shm_queue PUBLIC ${EXTRA_INCLUDES} ) target_include_directories(shm_queue PUBLIC ${PROJECT_BINARY_DIR}/src @@ -46,21 +53,23 @@ target_link_libraries(shm_queue PUBLIC ${EXTRA_LIBS} ) # install rules -install(TARGETS shm_queue DESTINATION lib) +install(TARGETS shm_queue DESTINATION lib) install(FILES ./socket/socket_def.h ./socket/bus_server_socket.h ./socket/shm_socket.h -./socket/shm_stream_mod_socket.h ./socket/shm_mod_socket.h ./socket/bus_server_socket_wrapper.h ./psem.h +./pread_write_lock.h ./key_def.h ./time_util.h +./sv_read_write_lock.h ./futex_sem.h ./bus_error.h ./bus_def.h ./logger_factory.h +./sole.h ./queue/linked_lock_free_queue.h ./queue/array_lock_free_queue.h ./queue/shm_queue.h @@ -74,11 +83,10 @@ ./net/net_mod_server_socket.h ./net/net_mod_socket_wrapper.h ./shm/hashtable.h -./shm/mem_pool.h ./shm/mm.h ./shm/shm_mm_wrapper.h ./shm/shm_allocator.h - +./shm/shm_mm.h DESTINATION include) -- Gitblit v1.8.0