Skip to content

Commit

Permalink
add shared option
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceIm committed Jan 23, 2022
1 parent 000c2f0 commit 7adc97c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion recipes/grpc/all/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
6 changes: 6 additions & 0 deletions recipes/grpc/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -29,6 +30,7 @@ class grpcConan(ConanFile):
"secure": [True, False]
}
default_options = {
"shared": False,
"fPIC": True,
"codegen": True,
"csharp_ext": False,
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 7adc97c

Please sign in to comment.