Skip to content

Commit

Permalink
(conan-io#24061) elfutils: Correctly set pkg-config names for libraries
Browse files Browse the repository at this point in the history
The pkg-config names should be set as provided by the project.
See https://sourceware.org/git/?p=elfutils.git;a=tree;f=config;hb=HEAD.
  • Loading branch information
jwillikers authored May 22, 2024
1 parent 57d9ca5 commit e3fdf69
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions recipes/elfutils/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ def package_info(self):
# library components
self.cpp_info.components["libelf"].libs = ["elf"]
self.cpp_info.components["libelf"].requires = ["zlib::zlib"]
self.cpp_info.components["libelf"].set_property("pkg_config_name", "libelf")
if self.options.with_bzlib:
self.cpp_info.components["libelf"].requires.append("bzip2::bzip2")
if self.options.with_lzma:
Expand All @@ -182,6 +183,7 @@ def package_info(self):

self.cpp_info.components["libdw"].libs = ["dw"]
self.cpp_info.components["libdw"].requires = ["libelf"]
self.cpp_info.components["libdw"].set_property("pkg_config_name", "libdw")
if self.settings.os in ["Linux", "FreeBSD"]:
self.cpp_info.components["libdw"].system_libs.extend(["dl"])

Expand All @@ -192,6 +194,7 @@ def package_info(self):
if self.options.get_safe("libdebuginfod"):
self.cpp_info.components["libdebuginfod"].libs = ["debuginfod"]
self.cpp_info.components["libdebuginfod"].requires = ["libcurl::curl"]
self.cpp_info.components["libdebuginfod"].set_property("pkg_config_name", "libdebuginfod")

# utilities
bin_path = os.path.join(self.package_folder, "bin")
Expand Down

0 comments on commit e3fdf69

Please sign in to comment.