brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 1 | # Copyright 2016 Google Inc. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
| 5 | |
| 6 | # This file is used to shared GN source lists between the standalone Skia |
| 7 | # and Chrome skia build. All paths produced by this header must be |
| 8 | # source-absolute since it will be included in different contexts in each |
| 9 | # checkout. |
| 10 | _path_to_include = get_path_info("../include", "abspath") |
| 11 | _path_to_src = get_path_info("../src", "abspath") |
| 12 | |
| 13 | # Core. |
| 14 | _core_gypi = exec_script("gypi_to_gn.py", |
| 15 | [ |
| 16 | rebase_path("../gyp/core.gypi"), |
| 17 | "--replace=<(skia_include_path)=$_path_to_include", |
| 18 | "--replace=<(skia_src_path)=$_path_to_src", |
| 19 | ], |
| 20 | "scope", |
| 21 | [ "../gyp/core.gypi" ]) |
| 22 | skia_core_sources = _core_gypi.sources |
| 23 | |
| 24 | # Effects. |
| 25 | _effects_gypi = |
| 26 | exec_script("gypi_to_gn.py", |
| 27 | [ |
| 28 | rebase_path("../gyp/effects.gypi"), |
| 29 | "--replace=<(skia_include_path)=$_path_to_include", |
| 30 | "--replace=<(skia_src_path)=$_path_to_src", |
| 31 | ], |
| 32 | "scope", |
| 33 | [ "../gyp/effects.gypi" ]) |
| 34 | skia_effects_sources = _effects_gypi.sources |
| 35 | |
| 36 | # GPU. |
| 37 | _gpu_gypi = exec_script("gypi_to_gn.py", |
| 38 | [ |
| 39 | rebase_path("../gyp/gpu.gypi"), |
| 40 | "--replace=<(skia_include_path)=$_path_to_include", |
| 41 | "--replace=<(skia_src_path)=$_path_to_src", |
| 42 | ], |
| 43 | "scope", |
| 44 | [ "../gyp/gpu.gypi" ]) |
| 45 | skia_gpu_sources = _gpu_gypi.skgpu_sources |
| 46 | skia_null_gpu_sources = _gpu_gypi.skgpu_null_gl_sources |
mtklein | 6ef6999 | 2016-09-14 06:12:09 -0700 | [diff] [blame] | 47 | skia_vk_sources = _gpu_gypi.skgpu_vk_sources |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 48 | |
| 49 | # Opts. |
| 50 | # |
| 51 | # Unlike the other variables here, this is a "scope" consisting of many |
| 52 | # sub-lists. |
| 53 | skia_opts = exec_script("gypi_to_gn.py", |
| 54 | [ |
| 55 | rebase_path("../gyp/opts.gypi"), |
| 56 | "--replace=<(skia_include_path)=$_path_to_include", |
| 57 | "--replace=<(skia_src_path)=$_path_to_src", |
| 58 | ], |
| 59 | "scope", |
| 60 | [ "../gyp/opts.gypi" ]) |
| 61 | |
| 62 | # PDF. |
| 63 | _pdf_gypi = exec_script("gypi_to_gn.py", |
| 64 | [ |
| 65 | rebase_path("../gyp/pdf.gypi"), |
| 66 | "--replace=<(skia_include_path)=$_path_to_include", |
| 67 | "--replace=<(skia_src_path)=$_path_to_src", |
| 68 | ], |
| 69 | "scope", |
| 70 | [ "../gyp/pdf.gypi" ]) |
| 71 | skia_pdf_sources = _pdf_gypi.sources |
| 72 | |
brettw | 45d1b44 | 2016-09-06 12:43:55 -0700 | [diff] [blame] | 73 | _sources_gypi = exec_script("gypi_to_gn.py", |
mtklein | 1bd72ba | 2016-09-16 07:45:52 -0700 | [diff] [blame] | 74 | [ rebase_path("../gyp/skia_sources.gypi") ], |
| 75 | "scope", |
| 76 | [ "../gyp/skia_sources.gypi" ]) |
brettw | 45d1b44 | 2016-09-06 12:43:55 -0700 | [diff] [blame] | 77 | skia_sksl_sources = get_path_info(_sources_gypi.sksl_sources, "abspath") |
| 78 | skia_utils_sources = get_path_info(_sources_gypi.utils_sources, "abspath") |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 79 | |
| 80 | # Skia Chromium defines. These flags will be defined in chromium If these |
| 81 | # become 'permanent', they should be moved into Chrome's skia build file. |
| 82 | skia_for_chromium_defines = [ "SK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS" ] |
mtklein | 1bd72ba | 2016-09-16 07:45:52 -0700 | [diff] [blame] | 83 | |
| 84 | _android_framework_defines = |
| 85 | exec_script( |
| 86 | "gypi_to_gn.py", |
| 87 | [ rebase_path("../gyp/skia_for_android_framework_defines.gypi") ], |
| 88 | "scope", |
| 89 | [ "../gyp/core.gypi" ]) |
| 90 | skia_android_framework_defines = |
| 91 | _android_framework_defines.skia_for_android_framework_defines |