mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-25 06:18:08 +08:00
e4096d6c17
* [gRPC] 1.36.4 * [upb] update to 2020-12-19 * update version * [upb] Fix config.cmake file * [grpc] Restore using system upb * [grpc][upb] Version db changes * [grpc][upb] Fix building upbdefs in grpc Co-authored-by: Jeong YunWon <jeong@youknowone.org> Co-authored-by: Jonliu1993 <13720414433@163.com>
29 lines
1.3 KiB
Diff
29 lines
1.3 KiB
Diff
diff --git a/cmake/upb.cmake b/cmake/upb.cmake
|
|
index 59d6813..1ce8bce 100644
|
|
--- a/cmake/upb.cmake
|
|
+++ b/cmake/upb.cmake
|
|
@@ -24,8 +24,21 @@ set(_gRPC_UPB_LIBRARIES upb)
|
|
|
|
elseif(gRPC_UPB_PROVIDER STREQUAL "package")
|
|
find_package(upb CONFIG REQUIRED)
|
|
- set(_gRPC_UPB_LIBRARIES upb::upb)
|
|
+ set(_gRPC_UPB_LIBRARIES upb)
|
|
set(_gRPC_UPB_INCLUDE_DIR)
|
|
- set(upb ${_gRPC_UPB_LIBRARIES})
|
|
+ add_library(upb STATIC
|
|
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c
|
|
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c
|
|
+ )
|
|
+ set_target_properties(upb PROPERTIES OUTPUT_NAME grpc_upbdefs)
|
|
+ target_include_directories(upb PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated")
|
|
+ target_link_libraries(upb PUBLIC upb::all_libs)
|
|
+ if(gRPC_INSTALL)
|
|
+ install(TARGETS upb EXPORT gRPCTargets
|
|
+ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
|
|
+ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
|
|
+ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
|
|
+ )
|
|
+ endif()
|
|
set(_gRPC_FIND_UPB "if(NOT upb_FOUND)\n find_package(upb CONFIG REQUIRED)\nendif()")
|
|
endif()
|