aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools
diff options
context:
space:
mode:
authorClément Péron <peron.clem@gmail.com>2021-03-04 11:13:02 +0100
committerKhem Raj <raj.khem@gmail.com>2021-03-04 09:04:24 -0800
commit7ed67b8963b7cba444e8daa6d928112e26bcafff (patch)
treee09cf360bbcf27c430031456c45039c6ba968812 /meta-oe/recipes-devtools
parenta6c07fe69e439806807e1cd353fa651c5ed64ccc (diff)
downloadmeta-openembedded-7ed67b8963b7cba444e8daa6d928112e26bcafff.tar.gz
meta-openembedded-7ed67b8963b7cba444e8daa6d928112e26bcafff.tar.bz2
meta-openembedded-7ed67b8963b7cba444e8daa6d928112e26bcafff.zip
grpc: Add PackageConfig to build only required plugins
Signed-off-by: Clément Péron <peron.clem@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools')
-rw-r--r--meta-oe/recipes-devtools/grpc/grpc_1.36.1.bb11
1 files changed, 10 insertions, 1 deletions
diff --git a/meta-oe/recipes-devtools/grpc/grpc_1.36.1.bb b/meta-oe/recipes-devtools/grpc/grpc_1.36.1.bb
index 6e2707dae..56f20a4bf 100644
--- a/meta-oe/recipes-devtools/grpc/grpc_1.36.1.bb
+++ b/meta-oe/recipes-devtools/grpc/grpc_1.36.1.bb
@@ -35,11 +35,20 @@ EXTRA_OECMAKE = " \
-DgRPC_INSTALL_CMAKEDIR=${baselib}/cmake/${BPN} \
"
+PACKAGECONFIG ??= "cpp"
+PACKAGECONFIG[cpp] = "-DgRPC_BUILD_GRPC_CPP_PLUGIN=ON,-DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF"
+PACKAGECONFIG[csharp] = "-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=ON,-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF"
+PACKAGECONFIG[node] = "-DgRPC_BUILD_GRPC_NODE_PLUGIN=ON,-DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF"
+PACKAGECONFIG[objective-c] = "-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=ON,-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF"
+PACKAGECONFIG[php] = "-DgRPC_BUILD_GRPC_PHP_PLUGIN=ON,-DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF"
+PACKAGECONFIG[python] = "-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=ON,-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF"
+PACKAGECONFIG[ruby] = "-DgRPC_BUILD_GRPC_RUBY_PLUGIN=ON,-DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF"
+PACKAGECONFIG[protobuf-lite] = "-DgRPC_USE_PROTO_LITE=ON,-DgRPC_USE_PROTO_LITE=OFF,protobuf-lite"
+
do_configure_prepend() {
sed -i -e "s#lib/pkgconfig/#${baselib}/pkgconfig/#g" ${S}/CMakeLists.txt
}
-
do_configure_prepend_mipsarch() {
sed -i -e "s/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} rt m pthread)/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} atomic rt m pthread)/g" ${S}/CMakeLists.txt
}