John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 1 | # Copyright 2019 Google LLC. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | assert(is_fuchsia) |
| 6 | |
Robert Phillips | c919f97 | 2019-11-18 11:01:05 -0500 | [diff] [blame] | 7 | import("//build/fuchsia/sdk.gni") |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 8 | |
| 9 | fuchsia_sdk_manifest_exists = false |
| 10 | if (is_fuchsia && using_fuchsia_sdk) { |
| 11 | manifest_exists = exec_script("//build/fuchsia/file_exists", |
Robert Phillips | c919f97 | 2019-11-18 11:01:05 -0500 | [diff] [blame] | 12 | [ |
| 13 | "-file_name", |
| 14 | rebase_path(fuchsia_sdk_manifest_path), |
| 15 | ], |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 16 | "list lines", |
| 17 | [ "//build/fuchsia/file_exists" ]) |
| 18 | if (manifest_exists == [ "true" ]) { |
| 19 | fuchsia_sdk_manifest_exists = true |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | group("fuchsia") { |
Robert Phillips | c919f97 | 2019-11-18 11:01:05 -0500 | [diff] [blame] | 24 | if (fuchsia_sdk_manifest_exists == true) { |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 25 | deps = [ |
| 26 | "fidl", |
| 27 | "pkg", |
| 28 | "sysroot", |
| 29 | ] |
| 30 | } else { |
Robert Phillips | c919f97 | 2019-11-18 11:01:05 -0500 | [diff] [blame] | 31 | assert(false, |
| 32 | "Fuchsia SDK not found. Set arg skia_update_fuchsia_sdk=True " + |
| 33 | "to initialize.") |
John Rosasco | 24cbdab | 2019-09-25 14:14:35 -0700 | [diff] [blame] | 34 | } |
| 35 | } |