X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fcommon%2Fextensions%2Fapi%2FBUILD.gn;h=d4362fb78091c036805a18b9617a50fe8e11445e;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=8c023f430e369aa3b8da7b2a3889995e7861b38d;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/common/extensions/api/BUILD.gn b/src/chrome/common/extensions/api/BUILD.gn index 8c023f4..d4362fb 100644 --- a/src/chrome/common/extensions/api/BUILD.gn +++ b/src/chrome/common/extensions/api/BUILD.gn @@ -3,7 +3,7 @@ # found in the LICENSE file. import("//build/config/features.gni") -import("//build/json_schema.gni") +import("//extensions/generated_extensions_api.gni") gypi_values = exec_script( "//build/gypi_to_gn.py", @@ -11,63 +11,44 @@ gypi_values = exec_script( "scope", [ "api.gyp" ]) -# GYP version: chrome/common/extensions/api/api.gyp:chrome_api -group("api") { - # The GYP version has one target that does both the bundling and compiling - # over the same set of sources. In GN these actions are separate. - deps = [ - ":api_bundle", - ":api_compile", - ] -} - # Common sources that are both bundled and compiled. -if (is_android) { - # Should be eliminated. See crbug.com/305852. - schema_sources = gypi_values.android_schema_files -} else { - schema_sources = gypi_values.main_schema_files - if (is_chromeos) { - schema_sources += gypi_values.chromeos_schema_files - if (is_chrome_branded) { - schema_sources += gypi_values.chromeos_branded_schema_files +# GYP version: chrome/common/extensions/api/api.gyp:chrome_api +generated_extensions_api("api") { + if (is_android) { + # Should be eliminated. See crbug.com/305852. + sources = gypi_values.android_schema_files + } else { + sources = gypi_values.main_schema_files + if (is_chromeos) { + sources += gypi_values.chromeos_schema_files + if (is_chrome_branded) { + sources += gypi_values.chromeos_branded_schema_files + } + } + if (enable_webrtc) { + sources += gypi_values.webrtc_schema_files } } - if (enable_webrtc) { - schema_sources += gypi_values.webrtc_schema_files - } -} -schema_deps = [ - # Different APIs include some headers crom chrome/common that in turn - # include generated headers from these targets. - # TODO(brettw) this should be made unnecessary if possible. - "//components/metrics/proto", - "//device/serial", - - "//content/public/browser", - "//skia", - "//sync", -] -if (is_chromeos) { - # deps += [ "<(DEPTH)/chrome/chrome.gyp:drive_proto" ] TODO)GYP) -} - -json_schema_bundle("api_bundle") { - visibility = ":api" - sources = schema_sources if (!is_android) { - sources += gypi_values.main_non_compiled_schema_files + uncompiled_sources = gypi_values.main_non_compiled_schema_files } - root_namespace = "extensions::api" - deps = schema_deps + [ ":api_compile" ] - -} + impl_dir = "//chrome/browser/extensions/api" + root_namespace = "extensions::api::%(namespace)s" + bundle = true -json_schema_compile("api_compile") { - visibility = ":*" - sources = schema_sources - root_namespace = "extensions::api" - deps = schema_deps + deps = [ + # Different APIs include some headers from chrome/common that in turn + # include generated headers from these targets. + # TODO(brettw) this should be made unnecessary if possible. + "//components/metrics/proto", + + "//content/public/browser", + "//skia", + "//sync", + ] + if (is_chromeos) { + # deps += [ "<(DEPTH)/chrome/chrome.gyp:drive_proto" ] TODO)GYP) + } }