|
|
|
@ -5772,58 +5772,6 @@ endif() |
|
|
|
|
endif (gRPC_BUILD_CSHARP_EXT) |
|
|
|
|
if (gRPC_BUILD_TESTS) |
|
|
|
|
|
|
|
|
|
add_library(upb |
|
|
|
|
third_party/upb/google/protobuf/descriptor.upb.c |
|
|
|
|
third_party/upb/upb/decode.c |
|
|
|
|
third_party/upb/upb/def.c |
|
|
|
|
third_party/upb/upb/encode.c |
|
|
|
|
third_party/upb/upb/handlers.c |
|
|
|
|
third_party/upb/upb/msg.c |
|
|
|
|
third_party/upb/upb/msgfactory.c |
|
|
|
|
third_party/upb/upb/sink.c |
|
|
|
|
third_party/upb/upb/table.c |
|
|
|
|
third_party/upb/upb/upb.c |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
if(WIN32 AND MSVC) |
|
|
|
|
set_target_properties(upb PROPERTIES COMPILE_PDB_NAME "upb" |
|
|
|
|
COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" |
|
|
|
|
) |
|
|
|
|
if (gRPC_INSTALL) |
|
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/upb.pdb |
|
|
|
|
DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL |
|
|
|
|
) |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
target_include_directories(upb |
|
|
|
|
PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
|
|
|
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} |
|
|
|
|
PRIVATE ${_gRPC_SSL_INCLUDE_DIR} |
|
|
|
|
PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} |
|
|
|
|
PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} |
|
|
|
|
PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} |
|
|
|
|
PRIVATE ${_gRPC_CARES_INCLUDE_DIR} |
|
|
|
|
PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} |
|
|
|
|
PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} |
|
|
|
|
PRIVATE ${_gRPC_NANOPB_INCLUDE_DIR} |
|
|
|
|
) |
|
|
|
|
# avoid dependency on libstdc++ |
|
|
|
|
if (_gRPC_CORE_NOSTDCXX_FLAGS) |
|
|
|
|
set_target_properties(upb PROPERTIES LINKER_LANGUAGE C) |
|
|
|
|
# only use the flags for C++ source files |
|
|
|
|
target_compile_options(upb PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${_gRPC_CORE_NOSTDCXX_FLAGS}>) |
|
|
|
|
endif() |
|
|
|
|
target_link_libraries(upb |
|
|
|
|
${_gRPC_SSL_LIBRARIES} |
|
|
|
|
${_gRPC_ALLTARGETS_LIBRARIES} |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
endif (gRPC_BUILD_TESTS) |
|
|
|
|
if (gRPC_BUILD_TESTS) |
|
|
|
|
|
|
|
|
|
add_library(bad_client_test |
|
|
|
|
test/core/bad_client/bad_client.cc |
|
|
|
|
) |
|
|
|
|