Browse Source

chore: add temp CMakeLists

tags/0.1.0
DragonAura 3 years ago
parent
commit
64892b6890
1 changed files with 26 additions and 0 deletions
  1. +26
    -0
      CAPI/CMakeLists.txt

+ 26
- 0
CAPI/CMakeLists.txt View File

@@ -0,0 +1,26 @@
# 临时CMakeLists,仅供本地调试用
cmake_minimum_required(VERSION 3.5)

project(THUAI6_CAPI VERSION 1.0)

set(CMAKE_CXX_STANDARD 17)

aux_source_directory(./API/src CPP_LIST)
aux_source_directory(./proto PROTO_CPP_LIST)

find_package(Protobuf CONFIG REQUIRED)
find_package(gRPC CONFIG REQUIRED)

message(STATUS "Using protobuf ${Protobuf_VERSION}")
message(STATUS "Using gRPC ${gRPC_VERSION}")

add_executable(capi ${CPP_LIST} ${PROTO_CPP_LIST})

target_include_directories(capi PUBLIC ${PROJECT_SOURCE_DIR}/proto ${PROJECT_SOURCE_DIR}/API/include)

target_link_libraries(capi
protobuf::libprotobuf
gRPC::grpc
gRPC::grpc++_reflection
gRPC::grpc++
)

Loading…
Cancel
Save