2018-05-18 11:15:15 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2018-06-30 10:19:10 +08:00
|
|
|
index 51f6e17..d33b147 100644
|
2018-05-18 11:15:15 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
@@ -84,6 +84,9 @@ if(UNIX)
|
|
|
|
endif()
|
|
|
|
if(WIN32)
|
|
|
|
set(_gRPC_PLATFORM_WINDOWS ON)
|
|
|
|
+ if(${CMAKE_SYSTEM_NAME} MATCHES "WindowsStore")
|
|
|
|
+ set(_gRPC_PLATFORM_UWP ON)
|
|
|
|
+ endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
|
|
|
@@ -144,6 +147,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR})
|
|
|
|
# ``.proto`` files
|
|
|
|
#
|
|
|
|
function(protobuf_generate_grpc_cpp)
|
|
|
|
+ if(_gRPC_PLATFORM_UWP)
|
|
|
|
+ return()
|
|
|
|
+ endif()
|
|
|
|
+
|
|
|
|
if(NOT ARGN)
|
|
|
|
message(SEND_ERROR "Error: PROTOBUF_GENERATE_GRPC_CPP() called without any proto files")
|
|
|
|
return()
|
2018-06-30 10:19:10 +08:00
|
|
|
@@ -178,6 +185,7 @@ function(protobuf_generate_grpc_cpp)
|
2018-05-18 11:15:15 +08:00
|
|
|
endforeach()
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
+if(NOT _gRPC_PLATFORM_UWP)
|
2018-06-30 10:19:10 +08:00
|
|
|
add_custom_target(plugins
|
|
|
|
DEPENDS
|
|
|
|
grpc_cpp_plugin
|
|
|
|
@@ -199,6 +207,7 @@ add_custom_target(tools_c
|
|
|
|
gen_legal_metadata_characters
|
|
|
|
gen_percent_encoding_tables
|
|
|
|
)
|
2018-05-18 11:15:15 +08:00
|
|
|
+endif()
|
|
|
|
|
|
|
|
add_custom_target(tools_cxx
|
|
|
|
DEPENDS
|
|
|
|
@@ -3223,7 +3232,7 @@ if (gRPC_INSTALL)
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
-
|
|
|
|
+if(NOT _gRPC_PLATFORM_UWP)
|
|
|
|
add_library(grpc++_error_details
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/status/status.pb.cc
|
|
|
|
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/status/status.grpc.pb.cc
|
|
|
|
@@ -3285,6 +3294,7 @@ if (gRPC_INSTALL)
|
|
|
|
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
+endif()
|
|
|
|
|
|
|
|
if (gRPC_BUILD_TESTS)
|
|
|
|
|
2018-06-30 10:19:10 +08:00
|
|
|
@@ -3347,6 +3357,7 @@ endforeach()
|
2018-05-18 11:15:15 +08:00
|
|
|
|
|
|
|
endif (gRPC_BUILD_TESTS)
|
|
|
|
|
|
|
|
+if(NOT _gRPC_PLATFORM_UWP)
|
2018-06-30 10:19:10 +08:00
|
|
|
add_library(grpc++_reflection
|
|
|
|
src/cpp/ext/proto_server_reflection.cc
|
|
|
|
src/cpp/ext/proto_server_reflection_plugin.cc
|
|
|
|
@@ -3409,6 +3420,7 @@ if (gRPC_INSTALL)
|
|
|
|
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
|
2018-05-18 11:15:15 +08:00
|
|
|
)
|
|
|
|
endif()
|
2018-06-30 10:19:10 +08:00
|
|
|
+endif()
|
2018-05-18 11:15:15 +08:00
|
|
|
|
|
|
|
if (gRPC_BUILD_TESTS)
|
2018-06-30 10:19:10 +08:00
|
|
|
|
|
|
|
@@ -4197,6 +4209,7 @@ endforeach()
|
2018-05-18 11:15:15 +08:00
|
|
|
|
|
|
|
endif (gRPC_BUILD_TESTS)
|
|
|
|
|
|
|
|
+if(NOT _gRPC_PLATFORM_UWP)
|
2018-06-30 10:19:10 +08:00
|
|
|
add_library(grpc_plugin_support
|
|
|
|
src/compiler/cpp_generator.cc
|
|
|
|
src/compiler/csharp_generator.cc
|
|
|
|
@@ -4236,6 +4249,8 @@ target_link_libraries(grpc_plugin_support
|
2018-05-18 11:15:15 +08:00
|
|
|
${_gRPC_PROTOBUF_LIBRARIES}
|
|
|
|
${_gRPC_ALLTARGETS_LIBRARIES}
|
|
|
|
)
|
|
|
|
+endif()
|
|
|
|
+
|
|
|
|
|
|
|
|
foreach(_hdr
|
|
|
|
include/grpc++/impl/codegen/config_protobuf.h
|
2018-06-30 10:19:10 +08:00
|
|
|
@@ -4248,7 +4263,7 @@ foreach(_hdr
|
2018-05-18 11:15:15 +08:00
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
-
|
|
|
|
+if(NOT _gRPC_PLATFORM_UWP)
|
2018-06-30 10:19:10 +08:00
|
|
|
if (gRPC_INSTALL)
|
|
|
|
install(TARGETS grpc_plugin_support EXPORT gRPCTargets
|
|
|
|
RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
|
|
|
|
@@ -4256,6 +4271,7 @@ if (gRPC_INSTALL)
|
|
|
|
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
|
|
|
|
)
|
2018-05-18 11:15:15 +08:00
|
|
|
endif()
|
2018-06-30 10:19:10 +08:00
|
|
|
+endif()
|
2018-05-18 11:15:15 +08:00
|
|
|
|
|
|
|
if (gRPC_BUILD_TESTS)
|
2018-06-30 10:19:10 +08:00
|
|
|
|
|
|
|
@@ -10252,6 +10268,7 @@ target_link_libraries(grpc_cli
|
2018-05-18 11:15:15 +08:00
|
|
|
|
|
|
|
endif (gRPC_BUILD_TESTS)
|
|
|
|
|
|
|
|
+if(NOT _gRPC_PLATFORM_UWP)
|
2018-06-30 10:19:10 +08:00
|
|
|
add_executable(grpc_cpp_plugin
|
|
|
|
src/compiler/cpp_plugin.cc
|
2018-05-18 11:15:15 +08:00
|
|
|
)
|
2018-06-30 10:19:10 +08:00
|
|
|
@@ -10488,6 +10505,7 @@ if (gRPC_INSTALL)
|
|
|
|
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
|
2018-05-18 11:15:15 +08:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
+endif()
|
2018-06-30 10:19:10 +08:00
|
|
|
|
2018-05-18 11:15:15 +08:00
|
|
|
if (gRPC_BUILD_TESTS)
|
|
|
|
|