From 6508e37f3d5a23821fd6aa718467397f58b17676 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 27 May 2021 00:40:56 +0200 Subject: [PATCH] breakpad: add components --- recipes/breakpad/all/conanfile.py | 20 +++++++++++++++---- .../all/test_package/test_package.cpp | 6 +++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/recipes/breakpad/all/conanfile.py b/recipes/breakpad/all/conanfile.py index 49584b64e7001..c6ca09ab022bf 100644 --- a/recipes/breakpad/all/conanfile.py +++ b/recipes/breakpad/all/conanfile.py @@ -4,7 +4,7 @@ required_conan_version = ">=1.33.0" -class BreakpadConan( ConanFile ): +class BreakpadConan(ConanFile): name = "breakpad" description = "A set of client and server components which implement a crash-reporting system" topics = ["crash", "report", "breakpad"] @@ -108,11 +108,23 @@ def package(self): tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info( self ): - self.cpp_info.libs = ["breakpad", "breakpad_client"] - self.cpp_info.includedirs = [os.path.join("include", "breakpad")] + self.cpp_info.components["libbreakpad"].libs = ["breakpad"] + self.cpp_info.components["libbreakpad"].includedirs.append(os.path.join("include", "breakpad")) + self.cpp_info.components["libbreakpad"].names["pkg_config"] = "breakpad" + + self.cpp_info.components["client"].libs = ["breakpad_client"] + self.cpp_info.components["client"].includedirs.append(os.path.join("include", "breakpad")) + self.cpp_info.components["client"].names["pkg_config"] = "breakpad-client" + + if tools.is_apple_os(self.settings.os): + self.cpp_info.components["client"].frameworks.append("CoreFoundation") if self.settings.os == "Linux": - self.cpp_info.system_libs.append("pthread") + self.cpp_info.components["libbreakpad"].system_libs.append("pthread") + self.cpp_info.components["libbreakpad"].requires.append("linux-syscall-support::linux-syscall-support") + + self.cpp_info.components["client"].system_libs.append("pthread") + self.cpp_info.components["client"].requires.append("linux-syscall-support::linux-syscall-support") bindir = os.path.join(self.package_folder, "bin") self.output.info("Appending PATH environment variable: {}".format(bindir)) diff --git a/recipes/breakpad/all/test_package/test_package.cpp b/recipes/breakpad/all/test_package/test_package.cpp index d431b44172e09..83fc0946bdb6c 100644 --- a/recipes/breakpad/all/test_package/test_package.cpp +++ b/recipes/breakpad/all/test_package/test_package.cpp @@ -1,6 +1,7 @@ -#include #include "client/linux/handler/exception_handler.h" +#include + using namespace google_breakpad; namespace { @@ -17,8 +18,7 @@ bool callback(const MinidumpDescriptor &descriptor, } int main(int argc, char *argv[]) { - - std::cout << "Breakpad test_package" << std::endl; + std::cout << "Breakpad test_package\n"; MinidumpDescriptor descriptor("path/to/cache"); ExceptionHandler eh(