fix bug when build core only
This commit is contained in:
parent
216b86f8d7
commit
27d96a2947
|
|
@ -4,5 +4,8 @@ proto/**/*.pb.cc
|
|||
proto/**/*.pb.h
|
||||
default.etcd/
|
||||
|
||||
# vscode
|
||||
.vscode/
|
||||
|
||||
# vscode-clangd
|
||||
.cache/
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ if(NOT gRPC_FOUND)
|
|||
find_dependency(GRPC)
|
||||
endif()
|
||||
|
||||
find_dependency(cpprestsdk)
|
||||
find_package(cpprestsdk QUIET)
|
||||
if(cpprestsdk_FOUND)
|
||||
set(CPPREST_LIB cpprestsdk::cpprest)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ file(GLOB_RECURSE CPP_CLIENT_CORE_SRC
|
|||
"${CMAKE_CURRENT_SOURCE_DIR}/**/*.cpp"
|
||||
)
|
||||
|
||||
if(BUILD_ETCD_CORE_ONLY)
|
||||
list(REMOVE_ITEM CPP_CLIENT_CORE_SRC "${CMAKE_CURRENT_SOURCE_DIR}/Client.cpp")
|
||||
endif()
|
||||
|
||||
add_library(etcd-cpp-api-core-objects OBJECT ${CPP_CLIENT_CORE_SRC} ${PROTOBUF_GENERATES})
|
||||
use_cxx(etcd-cpp-api-core-objects)
|
||||
set_exceptions(etcd-cpp-api-core-objects)
|
||||
|
|
|
|||
Loading…
Reference in New Issue