mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-26 19:19:00 +08:00
125 lines
2.9 KiB
Diff
125 lines
2.9 KiB
Diff
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)
|
|
|