From d52c87dee3aac4af66ad2e1a86094ca27209d816 Mon Sep 17 00:00:00 2001
From: fujuntang <fujuntang@smartai.com>
Date: 星期二, 16 十一月 2021 16:19:45 +0800
Subject: [PATCH] Fix the service manager exits exceptionally issue.

---
 shm_util/CMakeLists.txt |   37 ++++++++++++++++++++++++++++++++++---
 1 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/shm_util/CMakeLists.txt b/shm_util/CMakeLists.txt
index c604f55..038b858 100644
--- a/shm_util/CMakeLists.txt
+++ b/shm_util/CMakeLists.txt
@@ -1,6 +1,37 @@
-add_executable(shm_util shm_util.cpp )
-target_link_libraries(shm_util PRIVATE shm_queue ${EXTRA_LIBS} )
-target_include_directories(shm_util PRIVATE
+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
                             "${PROJECT_BINARY_DIR}"
                              ${EXTRA_INCLUDES}
                             )
\ No newline at end of file

--
Gitblit v1.8.0