Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / BUILD.gn
index d7c5cd5..e2fdb39 100644 (file)
 # you add a new build file, there must be some path of dependencies from this
 # file to your new one or GN won't know about it.
 
+import("//build/config/ui.gni")
+if (is_android) {
+  import("//build/config/android/config.gni")
+}
+
+declare_args() {
+  # A list of extra dependencies to add to the root target. This allows a
+  # checkout to add additional targets without explicitly changing any checked-
+  # in files.
+  root_extra_deps = []
+}
+
 # In GN, a "group" is a dummy target that just lists other targets.
 group("root") {
-  # Declares that this target should be treated as "external" in the GN-GYP
-  # hybrid build, and GN will not generate a GYP file for it. This flag is
-  # ignored in the pure GN build.
-  external = true
+  # This should not be linked into production and depends on test targets.
+  testonly = true
 
+  # Note that some dependencies are commented out. These are things that are
+  # currently written but not hooked up to the build yet. They may need to be
+  # completed or possibly just tested and then re-enabled.
   deps = [
-    "//base(//build/toolchain/nacl:x86_newlib)",
-    "//chrome",
-    "//components/language_usage_metrics",
-    "//components/navigation_metrics",
-    "//components/onc:onc_component",
-    "//components/startup_metric_utils",
-    "//components/translate:translate_core_browser",
-    "//components/translate:translate_core_common",
+    "//apps",
+    "//ash",
+    "//cc",
+    "//cc/blink",
+    "//chrome/browser",
+    "//chrome/browser/devtools",
+    "//chrome/common",
+    "//chrome/plugin",
+    "//chrome/renderer",
+    "//chrome/utility",
+    "//components:all_components",
+    "//content",
+    "//content/shell:content_shell",
+    "//content/test:test_support",
     "//crypto",
-    "//device/usb:device_usb",
+    "//device/battery",
+    "//device/bluetooth",
+    "//device/nfc",
+    "//extensions/browser",
+    "//extensions/common",
+    "//extensions/common/api",
+    "//extensions/renderer",
+    "//gin",
+    "//gpu",
+    "//google_apis",
+    "//google_apis/gcm",
     "//ipc",
+    "//ipc/mojo",
+    "//jingle:notifier",
+    "//media",
+    "//media/blink",
+    "//media/cast",
+    "//media/mojo",
+    "//mojo",
     "//net",
-    "//net/third_party/nss:ssl",
+    "//pdf",
+    "//ppapi:ppapi_c",
+    "//printing",
+    "//remoting/client/plugin",
+    "//sandbox",
     "//sdch",
-    "//third_party/WebKit/Source/platform",
-    "//third_party/icu:icudata",
+    "//skia",
+    "//storage/browser",
+    "//sql",
+    "//sync",
+    "//third_party/WebKit/public:all_blink",
+    "//third_party/angle:translator",
+    "//third_party/brotli",
+    "//third_party/cacheinvalidation",
+    "//third_party/cld",
+    "//third_party/cld_2",
+    "//third_party/ffmpeg",
+    "//third_party/flac",
+    "//third_party/harfbuzz-ng",
+    "//third_party/hunspell",
+    "//third_party/iccjpeg",
+    "//third_party/icu",
     "//third_party/leveldatabase",
+    "//third_party/libphonenumber",
+    "//third_party/libjingle",
     "//third_party/libpng",
+    "//third_party/libsrtp",
+    "//third_party/libusb",
+    "//third_party/libwebm",
+    "//third_party/libwebp",
+    "//third_party/libxslt",
+    "//third_party/libvpx",
+    "//third_party/libyuv",
+    "//third_party/lzma_sdk",
+    "//third_party/mesa",
+    "//third_party/opus",
+    "//third_party/ots",
+    "//third_party/protobuf:protobuf_lite",
+    "//third_party/qcms",
+    "//third_party/re2",
+    "//third_party/smhasher:cityhash",
+    "//third_party/smhasher:murmurhash3",
+    "//third_party/smhasher:pmurhash",
+    "//third_party/snappy",
+    "//third_party/speex",
+    "//third_party/usrsctp",
+    "//third_party/widevine/cdm:version_h",
+    "//third_party/webrtc",
     "//third_party/zlib",
-    "//skia",
+    "//third_party:jpeg",
     "//tools/gn",
+    "//tools/imagediff($host_toolchain)",
+    "//ui/accessibility",
+    "//ui/app_list",
+    "//ui/aura",
+    "//ui/base",
+    "//ui/display",
+    "//ui/events",
+    "//ui/gfx",
+    "//ui/gl",
+    "//ui/keyboard",
+    "//ui/native_theme",
+    "//ui/resources",
+    "//ui/snapshot",
+    "//ui/strings",
+    "//ui/surface",
+    "//ui/views",
+    "//ui/views/controls/webview",
+    "//ui/web_dialogs",
     "//url",
-  ]
+    "//v8:v8",
+  ] + root_extra_deps
+
+  if (!is_win) {
+    deps += [ "//breakpad:symupload" ]
+  }
+
+  if (is_linux) {
+    deps += [
+      "//dbus",
+      "//third_party/fontconfig",
+      "//third_party/freetype2",
+    ]
+  }
+
+  if (use_x11) {
+    deps += [ "//tools/xdisplaycheck" ]
+  }
+
+  if (use_aura) {
+    deps += [ "//ui/wm" ]
+  }
+
+  if (is_win) {
+    deps += [
+      "//ui/metro_viewer",
+    ]
+  }
+
+  if (is_win || is_mac || is_chromeos) {
+    # RLZ works on these platforms.
+    deps += [
+      "//rlz:rlz_lib",
+    ]
+  }
+
+  if (cpu_arch == "x86" || cpu_arch == "x64") {
+    # YASM is x86/x64 only.
+    deps += [ "//third_party/yasm($host_toolchain)" ]
+  }
+
+  if (is_android) {
+    deps += [
+      "//base/android/linker:chromium_android_linker",
+      "//build/android/rezip",
+      "//third_party/openmax_dl/dl",
+      "//content/shell/android:content_shell_apk",
+      "//chrome/android:chrome_shell_apk",
+      "//chrome/test/chromedriver/test/webview_shell:chromedriver_webview_shell_apk",
+      "//ui/android:ui_java",
+      "//third_party/android_tools:android_gcm_java",
+      "//third_party/android_tools:uiautomator_java",
+      "//third_party/android_tools:android_support_v13_java",
+      "//third_party/android_tools:android_support_v7_appcompat_java",
+      "//third_party/android_tools:android_support_v7_mediarouter_java",
+      "//third_party/eyesfree:eyesfree_java",
+    ]
+
+    if (has_chrome_android_internal) {
+      deps += [
+        "//clank",
+      ]
+    }
+
+    deps -= [
+      "//apps",  # Needs testing.
+      "//chrome/browser",
+      "//chrome/browser/devtools",
+      "//chrome/common",
+      "//chrome/plugin",
+      "//chrome/renderer",
+      "//chrome/utility",
+      "//content/shell:content_shell",
+      "//extensions/browser",
+      "//extensions/common",
+      "//extensions/common/api",
+      "//extensions/renderer",
+      "//pdf",  # Not compiled on Android in GYP yet, either.
+      "//ppapi:ppapi_c",
+      "//third_party/libusb",
+      "//ui/keyboard",  # Blocked on content.
+
+      # Seems to not be compiled on Android. Otherwise it will need a config.h.
+      "//third_party/libxslt",
+
+      # Not relevant to Android.
+      "//ash",
+      "//tools/gn",
+      "//ui/aura",
+      "//ui/display",
+      "//ui/views",
+      "//ui/views/controls/webview",
+
+      # Fails on Android for unknown reasons.
+      "//third_party/flac",
+      "//breakpad:symupload",
+
+      # Not tested on Android yet:
+      "//google_apis/gcm",
+      "//remoting/client/plugin",
+      "//storage/browser",
+      "//third_party/cld_2",
+      "//third_party/ffmpeg",
+      "//ui/app_list",
+      "//ui/web_dialogs",
+    ]
+  }
+
+  if (use_ozone) {
+    deps += [
+      "//ui/ozone",
+      "//ui/ozone/demo",
+    ]
+  }
+
+  # Non-mobile builds.
+  if (!is_android && !is_ios) {
+    deps += [
+      "//device/usb",
+    ]
+  }
 }