aboutsummaryrefslogtreecommitdiff
path: root/ports/grpc/fix-uwp.patch
blob: 85ee80eecac9804ca2f1d797dc326b8c4029870a (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 51f6e17..d33b147 100644
--- 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()
@@ -178,6 +185,7 @@ function(protobuf_generate_grpc_cpp)
   endforeach()
 endfunction()
 
+if(NOT _gRPC_PLATFORM_UWP)
 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
 )
+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)
 
@@ -3347,6 +3357,7 @@ endforeach()
 
 endif (gRPC_BUILD_TESTS)
 
+if(NOT _gRPC_PLATFORM_UWP)
 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}
   )
 endif()
+endif()
 
 if (gRPC_BUILD_TESTS)
 
@@ -4197,6 +4209,7 @@ endforeach()
 
 endif (gRPC_BUILD_TESTS)
 
+if(NOT _gRPC_PLATFORM_UWP)
 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
   ${_gRPC_PROTOBUF_LIBRARIES}
   ${_gRPC_ALLTARGETS_LIBRARIES}
 )
+endif()
+
 
 foreach(_hdr
   include/grpc++/impl/codegen/config_protobuf.h
@@ -4248,7 +4263,7 @@ foreach(_hdr
   )
 endforeach()
 
-
+if(NOT _gRPC_PLATFORM_UWP)
 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}
   )
 endif()
+endif()
 
 if (gRPC_BUILD_TESTS)
 
@@ -10252,6 +10268,7 @@ target_link_libraries(grpc_cli
 
 endif (gRPC_BUILD_TESTS)
 
+if(NOT _gRPC_PLATFORM_UWP)
 add_executable(grpc_cpp_plugin
   src/compiler/cpp_plugin.cc
 )
@@ -10488,6 +10505,7 @@ if (gRPC_INSTALL)
     ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
   )
 endif()
+endif()
 
 if (gRPC_BUILD_TESTS)