def METHOD_NAME(self):
    # avoid collect_libs(), prefer explicit library name instead
    self.cpp_info.libs = ["package_lib"]
    # if package provides a pkgconfig file (package.pc, usually installed in <prefix>/lib/pkgconfig/)
    self.cpp_info.set_property("pkg_config_name", "package")
    # If they are needed on Linux, m, pthread and dl are usually needed on FreeBSD too
    if self.settings.os in ["Linux", "FreeBSD"]:
        self.cpp_info.system_libs.extend(["m", "pthread", "dl"])