From ee9de4031d70d69ccfd32d466070d68428dae2b2 Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期三, 19 五月 2021 16:34:20 +0800
Subject: [PATCH] change lib build config.

---
 src/CMakeLists.txt |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8d9de26..6e85736 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,15 +1,12 @@
 
 file(GLOB sources "./*.cpp" "../log/*.cpp")
 
-set(Target bhome_shmq)
-set(TargetStatic bhome_shmq_static)
-
 set(CMAKE_SHARED_LINKER_FLAGS  ${CMAKE_SHARED_LINKER_FLAGS} "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exported_symbols")
 include_directories(../log)
-add_library(${Target} SHARED ${sources})
-add_library(${TargetStatic} STATIC ${sources})
 
+add_library(bhcommon STATIC ${sources})
 set(LogLibs "boost_log;boost_log_setup;boost_thread;boost_filesystem")
+target_link_libraries(bhcommon bhome_msg ${LogLibs} pthread rt)
 
-target_link_libraries(${Target} bhome_msg ${LogLibs} pthread rt)
-target_link_libraries(${TargetStatic} bhome_msg ${LogLibs} pthread rt)
+add_library(bhome_shmq SHARED bh_api.cc)
+target_link_libraries(bhome_shmq bhcommon)

--
Gitblit v1.8.0