mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 15:32:10 +08:00
gn: Add “system” as a zlib source, used for standalone non-Win/Fuchsia
Bug: crashpad:79 Change-Id: I07e346000ce6df07ac7021056a4cb00d28443e15 Reviewed-on: https://chromium-review.googlesource.com/827745 Reviewed-by: Scott Graham <scottmg@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
3650d56570
commit
6e0f15b8f5
23
third_party/zlib/BUILD.gn
vendored
23
third_party/zlib/BUILD.gn
vendored
@ -14,23 +14,38 @@
|
||||
|
||||
import("../../build/crashpad_in_chromium.gni")
|
||||
|
||||
if (crashpad_in_chromium) {
|
||||
zlib_source = "chromium"
|
||||
} else if (!is_win && !is_fuchsia) {
|
||||
zlib_source = "system"
|
||||
} else {
|
||||
zlib_source = "embedded"
|
||||
}
|
||||
|
||||
config("zlib_config") {
|
||||
if (crashpad_in_chromium) {
|
||||
if (zlib_source == "chromium") {
|
||||
defines = [ "CRASHPAD_ZLIB_SOURCE_CHROMIUM" ]
|
||||
} else {
|
||||
} else if (zlib_source == "system") {
|
||||
defines = [ "CRASHPAD_ZLIB_SOURCE_SYSTEM" ]
|
||||
} else if (zlib_source == "embedded") {
|
||||
defines = [ "CRASHPAD_ZLIB_SOURCE_EMBEDDED" ]
|
||||
include_dirs = [ "zlib" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (crashpad_in_chromium) {
|
||||
if (zlib_source == "chromium") {
|
||||
group("zlib") {
|
||||
public_configs = [ ":zlib_config" ]
|
||||
public_deps = [
|
||||
"//third_party/zlib",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
} else if (zlib_source == "system") {
|
||||
source_set("zlib") {
|
||||
public_configs = [ ":zlib_config" ]
|
||||
libs = [ "z" ]
|
||||
}
|
||||
} else if (zlib_source == "embedded") {
|
||||
static_library("zlib") {
|
||||
sources = [
|
||||
"zlib/adler32.c",
|
||||
|
6
third_party/zlib/zlib_crashpad.h
vendored
6
third_party/zlib/zlib_crashpad.h
vendored
@ -19,12 +19,12 @@
|
||||
// available at any other location in the source tree. It will #include the
|
||||
// proper <zlib.h> depending on how the build has been configured.
|
||||
|
||||
#if defined(CRASHPAD_ZLIB_SOURCE_SYSTEM)
|
||||
#if defined(CRASHPAD_ZLIB_SOURCE_CHROMIUM)
|
||||
#include "third_party/zlib/zlib.h"
|
||||
#elif defined(CRASHPAD_ZLIB_SOURCE_SYSTEM)
|
||||
#include <zlib.h>
|
||||
#elif defined(CRASHPAD_ZLIB_SOURCE_EMBEDDED)
|
||||
#include "third_party/zlib/zlib/zlib.h"
|
||||
#elif defined(CRASHPAD_ZLIB_SOURCE_CHROMIUM)
|
||||
#include "third_party/zlib/zlib.h"
|
||||
#else
|
||||
#error Unknown zlib source
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user