Skip to content

Commit 9eaf51d

Browse files
committed
added openssl and curl options to conanfile
1 parent fb12ba5 commit 9eaf51d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

kubernetes/conanfile.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class kubernetes_client_cRecipe(ConanFile):
1616

1717
# Binary configuration
1818
settings = "os", "compiler", "build_type", "arch"
19-
options = {"shared": [True, False], "fPIC": [True, False]}
20-
default_options = {"shared": False, "fPIC": True}
19+
options = {"shared": [True, False], "fPIC": [True, False], "openssl_shared":[True, False], "openssl_version": ["1", "3"], "curl_version": ["7", "8"]}
20+
default_options = {"shared": False, "fPIC": True, "openssl_shared": True, "openssl_version": "3", "curl_version": "8"}
2121

2222
# Sources are located in the same place as this recipe, copy them to the recipe
2323
exports_sources = "config.h.in", "ConfigureChecks.cmake", "PreTarget.cmake", "PostTarget.cmake", "CMakeLists.txt", "src/*", "external/*", "api/*", "model/*", "include/*", "config/*", "watch/*", "websocket/*"
@@ -29,6 +29,7 @@ def config_options(self):
2929
def configure(self):
3030
if self.options.shared:
3131
self.options.rm_safe("fPIC")
32+
self.options["openssl/*"].shared = self.options.openssl_shared
3233

3334
def layout(self):
3435
cmake_layout(self)
@@ -59,7 +60,7 @@ def package_info(self):
5960
self.cpp_info.libs = ["kubernetes"]
6061

6162
def requirements(self):
62-
self.requires("libcurl/[^8]", transitive_headers=True)
63-
self.requires("openssl/[~1.1]")
64-
self.requires("libwebsockets/4.2.0", transitive_headers=True)
65-
self.requires("libyaml/0.2.5")
63+
self.requires("libcurl/[~{}]".format(self.options.curl_version), transitive_headers=True)
64+
self.requires("openssl/[~{}]".format(self.options.openssl_version), force=True)
65+
self.requires("libwebsockets/[^4]", transitive_headers=True)
66+
self.requires("libyaml/[^0.2]")

0 commit comments

Comments
 (0)