Browse Source

Merge pull request #12 from DragonAura/dev

chore: add temp CMakeLists
tags/0.1.0
TCL GitHub 3 years ago
parent
commit
e7219de04e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 0 deletions
  1. +1
    -0
      .gitignore
  2. +26
    -0
      CAPI/CMakeLists.txt

+ 1
- 0
.gitignore View File

@@ -1,3 +1,4 @@
# .vs, .vscode must be ignored # .vs, .vscode must be ignored
.vs/ .vs/
.vscode/ .vscode/
CAPI/build

+ 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