From cf05ea3d9f43e4e84d621e1f9d54cbef552b6e2b Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期二, 18 五月 2021 16:53:28 +0800 Subject: [PATCH] fix center init mutex. --- proto/cpp/CMakeLists.txt | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/proto/cpp/CMakeLists.txt b/proto/cpp/CMakeLists.txt index abf2098..1399af0 100644 --- a/proto/cpp/CMakeLists.txt +++ b/proto/cpp/CMakeLists.txt @@ -1,11 +1,14 @@ cmake_minimum_required(VERSION 3.0) set (Target "bhome_msg") +set (TargetStatic "bhome_msg_static") project(${Target}) find_package(Protobuf REQUIRED) file(GLOB proto_files ../source/*.proto) PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS ${proto_files}) -add_library(${Target} STATIC ${PROTO_SRCS}) -target_link_libraries(${Target} libprotobuf-lite.a) +add_library(${Target} SHARED ${PROTO_SRCS}) +add_library(${TargetStatic} STATIC ${PROTO_SRCS}) +target_link_libraries(${Target} protobuf-lite) +target_link_libraries(${TargetStatic} libprotobuf-lite.a) -- Gitblit v1.8.0