mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 15:32:10 +08:00
zlib.gyp: support the "external" dependency mode
This CL implements support for the external model for Crashpad's zlib dependency, in which the dependencies and Crashpad are checked out as sibling in the same directory. Bug: crashpad: Change-Id: I0ca640e0be9b6a4fd8379026dfc8eb061b40badf Reviewed-on: https://chromium-review.googlesource.com/1124778 Reviewed-by: Joshua Peraza <jperaza@chromium.org> Commit-Queue: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
parent
038ba6eea2
commit
3072b4059f
27
third_party/zlib/zlib.gyp
vendored
27
third_party/zlib/zlib.gyp
vendored
@ -13,18 +13,28 @@
|
||||
# limitations under the License.
|
||||
|
||||
{
|
||||
'includes': [
|
||||
'../../build/crashpad_dependencies.gypi',
|
||||
],
|
||||
'conditions': [
|
||||
['1==1', { # Defer processing until crashpad_dependencies is set
|
||||
'variables': {
|
||||
'conditions': [
|
||||
['crashpad_dependencies=="external"', {
|
||||
'zlib_source%': 'external',
|
||||
}, 'OS!="win"', {
|
||||
# Use the system zlib by default where available, as it is on most
|
||||
# platforms. Windows does not have a system zlib, so use “embedded” which
|
||||
# directs the build to use the source code in the zlib subdirectory.
|
||||
['OS!="win"', {
|
||||
# platforms. Windows does not have a system zlib, so use “embedded”
|
||||
# which directs the build to use the source code in the zlib
|
||||
# subdirectory.
|
||||
'zlib_source%': 'system',
|
||||
}, {
|
||||
'zlib_source%': 'embedded',
|
||||
}],
|
||||
],
|
||||
},
|
||||
}],
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'zlib',
|
||||
@ -141,6 +151,17 @@
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['zlib_source=="external"', {
|
||||
'type': 'none',
|
||||
'direct_dependent_settings': {
|
||||
'defines': [
|
||||
'CRASHPAD_ZLIB_SOURCE_EXTERNAL',
|
||||
],
|
||||
},
|
||||
'dependencies': [
|
||||
'../../../../zlib/zlib.gyp:zlib',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
],
|
||||
|
5
third_party/zlib/zlib_crashpad.h
vendored
5
third_party/zlib/zlib_crashpad.h
vendored
@ -19,9 +19,8 @@
|
||||
// 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_EXTERNAL)
|
||||
#include "third_party/zlib/zlib.h"
|
||||
#elif defined(CRASHPAD_ZLIB_SOURCE_SYSTEM)
|
||||
#if defined(CRASHPAD_ZLIB_SOURCE_SYSTEM) || \
|
||||
defined(CRASHPAD_ZLIB_SOURCE_EXTERNAL)
|
||||
#include <zlib.h>
|
||||
#elif defined(CRASHPAD_ZLIB_SOURCE_EMBEDDED)
|
||||
#include "third_party/zlib/zlib/zlib.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user