diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index fcb4544dee1251..123ea7fca3ff73 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -135,10 +135,12 @@ class OpenSSLConan(ConanFile): "capieng_dialog": [True, False], "enable_capieng": [True, False], "openssldir": "ANY", + "debug_suffix": [True, False], } default_options = {key: False for key in options.keys()} default_options["fPIC"] = True default_options["openssldir"] = None + default_options["debug_suffix"] = True _env_build = None @@ -198,6 +200,9 @@ def config_options(self): del self.options.no_srp del self.options.no_ts del self.options.no_whirlpool + del self.options.debug_suffix + elif not self._use_nmake: + del self.options.debug_suffix if self._full_version < "1.1.1": del self.options.no_aria @@ -790,7 +795,7 @@ def package(self): if fnmatch.fnmatch(filename, "*.pdb"): os.unlink(os.path.join(self.package_folder, root, filename)) if self._use_nmake: - if self.settings.build_type == 'Debug' and self._full_version >= "1.1.0": + if self.settings.build_type == 'Debug' and self._full_version >= "1.1.0" and self.options.debug_suffix: with tools.chdir(os.path.join(self.package_folder, 'lib')): rename(self, "libssl.lib", "libssld.lib") rename(self, "libcrypto.lib", "libcryptod.lib") @@ -862,11 +867,11 @@ def package_info(self): self.cpp_info.components["ssl"].set_property("cmake_target_name", "OpenSSL::SSL") self.cpp_info.components["ssl"].set_property("pkg_config_name", "libssl") if self._use_nmake: - libsuffix = "d" if self.settings.build_type == "Debug" else "" if self._full_version < "1.1.0": self.cpp_info.components["ssl"].libs = ["ssleay32"] self.cpp_info.components["crypto"].libs = ["libeay32"] else: + libsuffix = "d" if self.options.debug_suffix and self.settings.build_type == "Debug" else "" self.cpp_info.components["ssl"].libs = ["libssl" + libsuffix] self.cpp_info.components["crypto"].libs = ["libcrypto" + libsuffix] else: