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
|
proto/**/*.pb.h
|
||||||
default.etcd/
|
default.etcd/
|
||||||
|
|
||||||
|
# vscode
|
||||||
|
.vscode/
|
||||||
|
|
||||||
# vscode-clangd
|
# vscode-clangd
|
||||||
.cache/
|
.cache/
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ if(NOT gRPC_FOUND)
|
||||||
find_dependency(GRPC)
|
find_dependency(GRPC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_dependency(cpprestsdk)
|
find_package(cpprestsdk QUIET)
|
||||||
if(cpprestsdk_FOUND)
|
if(cpprestsdk_FOUND)
|
||||||
set(CPPREST_LIB cpprestsdk::cpprest)
|
set(CPPREST_LIB cpprestsdk::cpprest)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,10 @@ file(GLOB_RECURSE CPP_CLIENT_CORE_SRC
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/**/*.cpp"
|
"${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})
|
add_library(etcd-cpp-api-core-objects OBJECT ${CPP_CLIENT_CORE_SRC} ${PROTOBUF_GENERATES})
|
||||||
use_cxx(etcd-cpp-api-core-objects)
|
use_cxx(etcd-cpp-api-core-objects)
|
||||||
set_exceptions(etcd-cpp-api-core-objects)
|
set_exceptions(etcd-cpp-api-core-objects)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue