lichao
2021-05-19 34cd75f77d0ca94dbdba4e6cc9451fe4d33e78b3
1
2
3
4
5
6
7
8
9
10
11
cmake_minimum_required(VERSION 3.0)
 
set (Target "bhome_msg")
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)