forked from trpc-ecosystem/cpp-telemetry-opentelemetry
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcom_github_trpc_cpp.cmake
More file actions
35 lines (28 loc) · 963 Bytes
/
Copy pathcom_github_trpc_cpp.cmake
File metadata and controls
35 lines (28 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#
#
# Tencent is pleased to support the open source community by making tRPC available.
#
# Copyright (C) 2023 Tencent.
# All rights reserved.
#
# If you have downloaded a copy of the tRPC source code from Tencent,
# please note that tRPC source code is licensed under the Apache 2.0 License,
# A copy of the Apache 2.0 License is included in this file.
#
#
include(FetchContent)
set(TRPC_CPP_GIT_URL https://github.com/trpc-group/trpc-cpp.git)
set(TRPC_CPP_GIT_TAG main)
FetchContent_Declare(
trpc-cpp
GIT_REPOSITORY ${TRPC_CPP_GIT_URL}
GIT_TAG ${TRPC_CPP_GIT_TAG}
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cmake_third_party/trpc-cpp
)
FetchContent_GetProperties(trpc-cpp)
if(NOT trpc-cpp_POPULATED)
FetchContent_Populate(trpc-cpp)
add_subdirectory(${trpc-cpp_SOURCE_DIR})
endif()
set(TARGET_INCLUDE_PATHS ${TARGET_INCLUDE_PATHS} ${trpc-cpp_SOURCE_DIR})
set(TARGET_LINK_LIBS ${TARGET_LINK_LIBS} trpc)