Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / components / crash / app / BUILD.gn
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 if (is_android) {
6   import("//build/config/android/config.gni")
7 }
8
9 source_set("lib") {
10   sources = [
11     "crash_reporter_client.cc",
12     "crash_reporter_client.h",
13     "crash_keys_win.cc",
14     "crash_keys_win.h",
15   ]
16
17   include_dirs = [
18     "../../../breakpad/src",
19   ]
20 }
21
22 # Note: if you depend on this target, you need to either link in
23 # content.gyp:content_common, or add content/public/common/content_switches.cc
24 # to your sources.
25 #
26 # GYP version: components/crash.gypi:crash_component
27 source_set("app") {
28   sources = [
29     "breakpad_linux_impl.h",
30     "breakpad_mac.h",
31     "breakpad_mac.mm",
32     "breakpad_win.cc",
33     "breakpad_win.h",
34     "hard_error_handler_win.cc",
35     "hard_error_handler_win.h",
36   ]
37   if (is_android || is_linux) {
38     # Want these files on both Linux and Android.
39     set_sources_assignment_filter([])
40     sources += [
41       "breakpad_linux.cc",
42       "breakpad_linux.h",
43     ]
44   }
45
46   defines = [ "CRASH_IMPLEMENTATION" ]
47
48   deps = [
49     "//base",
50     ":lib",
51   ]
52
53   if (is_android) {
54     defines += [ "CHROME_BUILD_ID=" + android_chrome_build_id ]
55   }
56
57   if (is_mac) {
58     deps += [ "//breakpad" ]
59   } else if (is_win) {
60     deps += [
61       "//sandbox",
62       "//breakpad:breakpad_handler",
63       #'../breakpad/breakpad.gyp:breakpad_sender',  TODO(GYP)
64     ]
65   } else if (is_posix && !is_ios && (!is_android || !is_android_webview_build)) {
66     deps += [ "//breakpad:client" ]
67   }
68 }
69
70 source_set("test_support") {
71   deps = [ ":lib" ]
72 }