Skip to content

Commit

Permalink
(conan-io#20999) fix(openssl): remove renaming of debug files within …
Browse files Browse the repository at this point in the history
…the recipe
  • Loading branch information
Sil3ntStorm authored and Ahajha committed Apr 6, 2024
1 parent 03ea4e3 commit 955ff77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
9 changes: 2 additions & 7 deletions recipes/openssl/1.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,6 @@ def package(self):
with chdir(self, self.source_folder):
self.run(f"nmake -f Makefile install_sw DESTDIR={self.package_folder}")
rm(self, "*.pdb", self.package_folder, recursive=True)
if self.settings.build_type == "Debug":
with chdir(self, os.path.join(self.package_folder, "lib")):
rename(self, "libssl.lib", "libssld.lib")
rename(self, "libcrypto.lib", "libcryptod.lib")
else:
autotools = Autotools(self)
with chdir(self, self.source_folder):
Expand Down Expand Up @@ -619,9 +615,8 @@ 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 ""
self.cpp_info.components["ssl"].libs = ["libssl" + libsuffix]
self.cpp_info.components["crypto"].libs = ["libcrypto" + libsuffix]
self.cpp_info.components["ssl"].libs = ["libssl"]
self.cpp_info.components["crypto"].libs = ["libcrypto"]
else:
self.cpp_info.components["ssl"].libs = ["ssl"]
self.cpp_info.components["crypto"].libs = ["crypto"]
Expand Down
11 changes: 2 additions & 9 deletions recipes/openssl/3.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,12 +554,6 @@ def package(self):
for filename in files:
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":
with chdir(self, os.path.join(self.package_folder, "lib")):
rename(self, "libssl.lib", "libssld.lib")
rename(self, "libcrypto.lib", "libcryptod.lib")

if self.options.shared:
libdir = os.path.join(self.package_folder, "lib")
for file in os.listdir(libdir):
Expand Down Expand Up @@ -649,9 +643,8 @@ def package_info(self):
self.cpp_info.components["crypto"].set_property("cmake_build_modules", [self._module_file_rel_path])

if self._use_nmake:
libsuffix = "d" if self.settings.build_type == "Debug" else ""
self.cpp_info.components["ssl"].libs = ["libssl" + libsuffix]
self.cpp_info.components["crypto"].libs = ["libcrypto" + libsuffix]
self.cpp_info.components["ssl"].libs = ["libssl"]
self.cpp_info.components["crypto"].libs = ["libcrypto"]
else:
self.cpp_info.components["ssl"].libs = ["ssl"]
self.cpp_info.components["crypto"].libs = ["crypto"]
Expand Down

0 comments on commit 955ff77

Please sign in to comment.