From de80ed87b8339f23624642786698057a62bdf779 Mon Sep 17 00:00:00 2001 From: fujuntang <fujuntang@smartai.com> Date: 星期二, 23 十一月 2021 11:25:48 +0800 Subject: [PATCH] Fix the communication failure issue when the registered applications exceeds the fixed amount. --- shm_util/CMakeLists.txt | 31 +++++++++++++++++++++++++++---- 1 files changed, 27 insertions(+), 4 deletions(-) diff --git a/shm_util/CMakeLists.txt b/shm_util/CMakeLists.txt index e58ff5b..038b858 100644 --- a/shm_util/CMakeLists.txt +++ b/shm_util/CMakeLists.txt @@ -1,11 +1,34 @@ -add_executable(shm_util shm_util.cpp ) -target_link_libraries(shm_util PRIVATE shm_queue ${EXTRA_LIBS} ) -target_include_directories(shm_util PRIVATE - "${PROJECT_BINARY_DIR}" +find_library(SHMQUEUE + NAMES shm_queue libshm_queue + HINTS "/home/wzq/Downloads" +) + + +if(SHMQUEUE) + message(STATUS "Looking for SHMQUEUE - found: ${SHMQUEUE}") +else() + message(STATUS "Looking for SHMQUEUE - not found") +endif() + +list(APPEND M_INCLUDES + ${PROJECT_BINARY_DIR}/src + ${PROJECT_SOURCE_DIR}/src + ${PROJECT_SOURCE_DIR}/src/shm + ${PROJECT_SOURCE_DIR}/src/queue + ${PROJECT_SOURCE_DIR}/src/socket + ${PROJECT_SOURCE_DIR}/src/net +) + +add_executable(shm_util2 shm_util.cpp ) +target_link_libraries(shm_util2 PRIVATE ${SHMQUEUE} ${EXTRA_LIBS} ) +target_include_directories(shm_util2 PRIVATE + ${PROJECT_BINARY_DIR} ${EXTRA_INCLUDES} + ${M_INCLUDES} ) + add_executable(shm_map shm_map.cpp ) target_link_libraries(shm_map PRIVATE shm_queue ${EXTRA_LIBS} ) target_include_directories(shm_map PRIVATE -- Gitblit v1.8.0