From 98d6460918ee7918fa591e12ed0698b14e539c9d Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期一, 01 三月 2021 16:03:35 +0800
Subject: [PATCH] update

---
 src/CMakeLists.txt |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9026d92..51184f4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -52,6 +52,19 @@
 
 target_link_libraries(shm_queue PUBLIC  ${EXTRA_LIBS} )
 
+
+if (BUILD_SHARED_LIBS)
+  add_custom_command(
+    OUTPUT ${PROJECT_BINARY_DIR}/lib/libshm_queue.so.md5
+    COMMAND md5sum  ${PROJECT_BINARY_DIR}/lib/libshm_queue.so >  ${PROJECT_BINARY_DIR}/lib/libshm_queue.so.md5
+    DEPENDS ${PROJECT_BINARY_DIR}/lib/libshm_queue.so
+    COMMENT "Generate libshm_queue.so.md5"
+    VERBATIM
+    )
+    
+ add_custom_target("genmd5" ALL DEPENDS ${PROJECT_BINARY_DIR}/lib/libshm_queue.so.md5)
+endif()
+
 # install rules
 install(TARGETS shm_queue  DESTINATION lib)
 install(FILES 

--
Gitblit v1.8.0