aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/qtgrpc
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/qtgrpc')
-rw-r--r--vcpkg/ports/qtgrpc/portfile.cmake17
-rw-r--r--vcpkg/ports/qtgrpc/protoc-host.patch23
-rw-r--r--vcpkg/ports/qtgrpc/vcpkg.json26
3 files changed, 66 insertions, 0 deletions
diff --git a/vcpkg/ports/qtgrpc/portfile.cmake b/vcpkg/ports/qtgrpc/portfile.cmake
new file mode 100644
index 0000000..4304d66
--- /dev/null
+++ b/vcpkg/ports/qtgrpc/portfile.cmake
@@ -0,0 +1,17 @@
+set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase")
+include("${SCRIPT_PATH}/qt_install_submodule.cmake")
+
+set(${PORT}_PATCHES protoc-host.patch)
+set(TOOL_NAMES qtprotobufgen qtgrpcgen)
+# native_grpc ->grpc WrapgRPC
+# grp -> qt[network]
+# qtprotobufgen -> protobuf WrapProtobuf
+qt_install_submodule(PATCHES ${${PORT}_PATCHES}
+ TOOL_NAMES ${TOOL_NAMES}
+ CONFIGURE_OPTIONS
+ -DCMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON
+ #--trace-expand
+ CONFIGURE_OPTIONS_MAYBE_UNUSED
+ QT_BUILD_EXAMPLES
+ QT_USE_DEFAULT_CMAKE_OPTIMIZATION_FLAGS
+ )
diff --git a/vcpkg/ports/qtgrpc/protoc-host.patch b/vcpkg/ports/qtgrpc/protoc-host.patch
new file mode 100644
index 0000000..a2d81fb
--- /dev/null
+++ b/vcpkg/ports/qtgrpc/protoc-host.patch
@@ -0,0 +1,23 @@
+diff --git a/cmake/FindWrapProtoc.cmake b/cmake/FindWrapProtoc.cmake
+index 82972c8f18..08335fa746 100644
+--- a/cmake/FindWrapProtoc.cmake
++++ b/cmake/FindWrapProtoc.cmake
+@@ -13,7 +13,7 @@ if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
+ list(APPEND __WrapProtoc_find_package_args QUIET)
+ endif()
+
+-if(NOT CMAKE_CROSSCOMPILING)
++if(0)
+ if(NOT TARGET Threads::Threads)
+ find_package(Threads ${__WrapProtoc_find_package_args})
+ endif()
+@@ -52,8 +52,8 @@ if(NOT CMAKE_CROSSCOMPILING)
+ endif()
+ endif()
+
+-if(NOT __WrapProtoc_protoc_imported_location)
++if(1)
+ if(CMAKE_CROSSCOMPILING)
+ set(__WrapProtoc_extra_prefix_paths "${QT_ADDITIONAL_HOST_PACKAGES_PREFIX_PATH}")
+ endif()
+ find_program(__WrapProtoc_protoc_imported_location
diff --git a/vcpkg/ports/qtgrpc/vcpkg.json b/vcpkg/ports/qtgrpc/vcpkg.json
new file mode 100644
index 0000000..4842826
--- /dev/null
+++ b/vcpkg/ports/qtgrpc/vcpkg.json
@@ -0,0 +1,26 @@
+{
+ "name": "qtgrpc",
+ "version": "6.9.1",
+ "description": "The Qt GRPC and Qt Protobuf modules together allow you to define data and messages in proto files, and then use the code generators, which generate client code allowing accessors for fields and gRPC services in the Qt framework.",
+ "homepage": "https://www.qt.io/",
+ "license": null,
+ "dependencies": [
+ {
+ "name": "grpc",
+ "default-features": false
+ },
+ {
+ "name": "protobuf",
+ "default-features": false
+ },
+ {
+ "name": "qtbase",
+ "default-features": false
+ },
+ {
+ "name": "qtgrpc",
+ "host": true,
+ "default-features": false
+ }
+ ]
+}