Skip to content

Commit

Permalink
Handle fPIC
Browse files Browse the repository at this point in the history
  • Loading branch information
offa committed Dec 12, 2023
1 parent 07f1928 commit 896154e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class RestclientcppConan(ConanFile):
homepage = "https://github.com/mrtazz/restclient-cpp"
topics = ("restclient", "libcurl", "rest-client", "http-client", "http")
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False]}
default_options = {"shared": False}
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = {"shared": False, "fPIC": True}
generators = ["CMakeDeps", "CMakeToolchain"]
exports = ["LICENSE"]
requires = ("libcurl/8.4.0", "jsoncpp/1.9.4")
Expand All @@ -26,6 +26,10 @@ def _configure_cmake(self):
def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)

def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")

def build(self):
cmake = self._configure_cmake()
cmake.build()
Expand Down

0 comments on commit 896154e

Please sign in to comment.