From 7adc97c16a7a59818bc00575fd920c09640b02e0 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 23 Jan 2022 21:01:07 +0100 Subject: [PATCH] add shared option --- recipes/grpc/all/CMakeLists.txt | 2 +- recipes/grpc/all/conanfile.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes/grpc/all/CMakeLists.txt b/recipes/grpc/all/CMakeLists.txt index 1848ca5a77c35..9d48e327cd88a 100644 --- a/recipes/grpc/all/CMakeLists.txt +++ b/recipes/grpc/all/CMakeLists.txt @@ -2,6 +2,6 @@ cmake_minimum_required(VERSION 2.8.12) project(cmake_wrapper) include(conanbuildinfo.cmake) -conan_basic_setup() +conan_basic_setup(KEEP_RPATHS) add_subdirectory("source_subfolder") diff --git a/recipes/grpc/all/conanfile.py b/recipes/grpc/all/conanfile.py index 0e822badaa968..97f0d3e43d467 100644 --- a/recipes/grpc/all/conanfile.py +++ b/recipes/grpc/all/conanfile.py @@ -16,6 +16,7 @@ class grpcConan(ConanFile): settings = "os", "arch", "compiler", "build_type" # TODO: Add shared option options = { + "shared": [True, False], "fPIC": [True, False], "codegen": [True, False], "csharp_ext": [True, False], @@ -29,6 +30,7 @@ class grpcConan(ConanFile): "secure": [True, False] } default_options = { + "shared": False, "fPIC": True, "codegen": True, "csharp_ext": False, @@ -68,6 +70,10 @@ def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + def configure(self): + if self.options.shared: + del self.options.fPIC + def requirements(self): self.requires('zlib/1.2.11') self.requires('openssl/1.1.1m')