Skip to content

Commit

Permalink
breakpad: add components
Browse files Browse the repository at this point in the history
  • Loading branch information
madebr committed May 26, 2021
1 parent 5e9bc80 commit 6508e37
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
20 changes: 16 additions & 4 deletions recipes/breakpad/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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))
Expand Down
6 changes: 3 additions & 3 deletions recipes/breakpad/all/test_package/test_package.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <iostream>
#include "client/linux/handler/exception_handler.h"

#include <iostream>

using namespace google_breakpad;

namespace {
Expand All @@ -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(
Expand Down

0 comments on commit 6508e37

Please sign in to comment.