Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2016 Google Inc. | 1 # Copyright 2016 Google Inc. |
| 2 # | 2 # |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 declare_args() { | 6 declare_args() { |
| 7 } | 7 } |
| 8 | 8 |
| 9 # Skia public API, generally provided by :skia. | 9 # Skia public API, generally provided by :skia. |
| 10 config("skia_public") { | 10 config("skia_public") { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 | 63 |
| 64 defines = [ "SKIA_IMPLEMENTATION=1" ] | 64 defines = [ "SKIA_IMPLEMENTATION=1" ] |
| 65 } | 65 } |
| 66 | 66 |
| 67 skia_library_configs = [ | 67 skia_library_configs = [ |
| 68 ":skia_public", | 68 ":skia_public", |
| 69 ":skia_private", | 69 ":skia_private", |
| 70 ":skia_library", | 70 ":skia_library", |
| 71 ] | 71 ] |
| 72 | 72 |
| 73 # Chrome's GN environment is mostly helpful, but a couple default configs tend t o get in the way. | 73 unwanted_configs = [] |
| 74 unwanted_configs = [ | |
| 75 "//build/config/clang:find_bad_constructs", # Chrome style checks. | |
| 76 "//build/config:feature_flags", # A bunch of #defines we don't care about. | |
| 77 ] | |
| 78 | 74 |
| 79 core_gypi = exec_script("build/gypi_to_gn.py", | 75 if (!is_fuchsia) { |
|
mtklein
2016/07/15 16:54:03
Is this... you sync Skia under a Fuschia GN root,
abarth
2016/07/15 17:48:54
That's correct. Our gn environment is less opinio
| |
| 76 # Chrome's GN environment is mostly helpful, but a couple default configs tend to get in the way. | |
| 77 unwanted_configs += [ | |
| 78 "//build/config/clang:find_bad_constructs", # Chrome style checks. | |
| 79 "//build/config:feature_flags", # A bunch of #defines we don't care about. | |
| 80 ] | |
| 81 } | |
| 82 | |
| 83 core_gypi = exec_script("//build/gypi_to_gn.py", | |
| 80 [ | 84 [ |
| 81 rebase_path("gyp/core.gypi"), | 85 rebase_path("gyp/core.gypi"), |
| 82 "--replace=<(skia_include_path)=include", | 86 "--replace=<(skia_include_path)=include", |
| 83 "--replace=<(skia_src_path)=src", | 87 "--replace=<(skia_src_path)=src", |
| 84 ], | 88 ], |
| 85 "scope", | 89 "scope", |
| 86 [ "gyp/core.gypi" ]) | 90 [ "gyp/core.gypi" ]) |
| 87 | 91 |
| 88 effects_gypi = exec_script("build/gypi_to_gn.py", | 92 effects_gypi = exec_script("//build/gypi_to_gn.py", |
| 89 [ | 93 [ |
| 90 rebase_path("gyp/effects.gypi"), | 94 rebase_path("gyp/effects.gypi"), |
| 91 "--replace=<(skia_include_path)=include", | 95 "--replace=<(skia_include_path)=include", |
| 92 "--replace=<(skia_src_path)=src", | 96 "--replace=<(skia_src_path)=src", |
| 93 ], | 97 ], |
| 94 "scope", | 98 "scope", |
| 95 [ "gyp/effects.gypi" ]) | 99 [ "gyp/effects.gypi" ]) |
| 96 | 100 |
| 97 gpu_gypi = exec_script("build/gypi_to_gn.py", | 101 gpu_gypi = exec_script("//build/gypi_to_gn.py", |
| 98 [ | 102 [ |
| 99 rebase_path("gyp/gpu.gypi"), | 103 rebase_path("gyp/gpu.gypi"), |
| 100 "--replace=<(skia_include_path)=include", | 104 "--replace=<(skia_include_path)=include", |
| 101 "--replace=<(skia_src_path)=src", | 105 "--replace=<(skia_src_path)=src", |
| 102 ], | 106 ], |
| 103 "scope", | 107 "scope", |
| 104 [ "gyp/gpu.gypi" ]) | 108 [ "gyp/gpu.gypi" ]) |
| 105 | 109 |
| 106 opts_gypi = exec_script("build/gypi_to_gn.py", | 110 opts_gypi = exec_script("//build/gypi_to_gn.py", |
| 107 [ | 111 [ |
| 108 rebase_path("gyp/opts.gypi"), | 112 rebase_path("gyp/opts.gypi"), |
| 109 "--replace=<(skia_include_path)=include", | 113 "--replace=<(skia_include_path)=include", |
| 110 "--replace=<(skia_src_path)=src", | 114 "--replace=<(skia_src_path)=src", |
| 111 ], | 115 ], |
| 112 "scope", | 116 "scope", |
| 113 [ "gyp/opts.gypi" ]) | 117 [ "gyp/opts.gypi" ]) |
| 114 | 118 |
| 115 pdf_gypi = exec_script("build/gypi_to_gn.py", | 119 pdf_gypi = exec_script("//build/gypi_to_gn.py", |
| 116 [ | 120 [ |
| 117 rebase_path("gyp/pdf.gypi"), | 121 rebase_path("gyp/pdf.gypi"), |
| 118 "--replace=<(skia_include_path)=include", | 122 "--replace=<(skia_include_path)=include", |
| 119 "--replace=<(skia_src_path)=src", | 123 "--replace=<(skia_src_path)=src", |
| 120 ], | 124 ], |
| 121 "scope", | 125 "scope", |
| 122 [ "gyp/pdf.gypi" ]) | 126 [ "gyp/pdf.gypi" ]) |
| 123 | 127 |
| 124 utils_gypi = exec_script("build/gypi_to_gn.py", | 128 utils_gypi = exec_script("//build/gypi_to_gn.py", |
| 125 [ | 129 [ |
| 126 rebase_path("gyp/utils.gypi"), | 130 rebase_path("gyp/utils.gypi"), |
| 127 "--replace=<(skia_include_path)=include", | 131 "--replace=<(skia_include_path)=include", |
| 128 "--replace=<(skia_src_path)=src", | 132 "--replace=<(skia_src_path)=src", |
| 129 ], | 133 ], |
| 130 "scope", | 134 "scope", |
| 131 [ "gyp/utils.gypi" ]) | 135 [ "gyp/utils.gypi" ]) |
| 132 | 136 |
| 133 source_set("opts_ssse3") { | 137 source_set("opts_ssse3") { |
| 134 configs += skia_library_configs | 138 configs += skia_library_configs |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 156 | 160 |
| 157 component("skia") { | 161 component("skia") { |
| 158 public_configs = [ ":skia_public" ] | 162 public_configs = [ ":skia_public" ] |
| 159 configs += skia_library_configs | 163 configs += skia_library_configs |
| 160 configs -= unwanted_configs | 164 configs -= unwanted_configs |
| 161 | 165 |
| 162 deps = [ | 166 deps = [ |
| 163 ":opts_avx", | 167 ":opts_avx", |
| 164 ":opts_sse41", | 168 ":opts_sse41", |
| 165 ":opts_ssse3", | 169 ":opts_ssse3", |
| 166 "third_party:zlib", | |
| 167 ] | 170 ] |
| 168 | 171 |
| 172 if (is_fuchsia) { | |
| 173 deps += [ "//third_party/zlib" ] | |
|
mtklein
2016/07/15 16:54:03
Think we should just create third_party/zlib/BUILD
abarth
2016/07/15 17:48:54
Yes, that would make more sense. Do you want me t
| |
| 174 } else { | |
| 175 deps += [ "third_party:zlib" ] | |
| 176 } | |
| 177 | |
| 169 libs = [] | 178 libs = [] |
| 170 | 179 |
| 171 sources = [] | 180 sources = [] |
| 172 sources += core_gypi.sources | 181 sources += core_gypi.sources |
| 173 sources += effects_gypi.sources | 182 sources += effects_gypi.sources |
| 174 sources += gpu_gypi.skgpu_sources | 183 sources += gpu_gypi.skgpu_sources |
| 175 sources += opts_gypi.sse2_sources | 184 sources += opts_gypi.sse2_sources |
| 176 sources += pdf_gypi.sources | 185 sources += pdf_gypi.sources |
| 177 sources += utils_gypi.sources | 186 sources += utils_gypi.sources |
| 178 sources += [ | 187 sources += [ |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 232 } | 241 } |
| 233 | 242 |
| 234 if (is_mac) { | 243 if (is_mac) { |
| 235 sources += [ | 244 sources += [ |
| 236 "src/ports/SkFontHost_mac.cpp", | 245 "src/ports/SkFontHost_mac.cpp", |
| 237 "src/ports/SkImageEncoder_CG.cpp", | 246 "src/ports/SkImageEncoder_CG.cpp", |
| 238 "src/ports/SkImageGeneratorCG.cpp", | 247 "src/ports/SkImageGeneratorCG.cpp", |
| 239 ] | 248 ] |
| 240 libs += [ "ApplicationServices.framework" ] | 249 libs += [ "ApplicationServices.framework" ] |
| 241 } | 250 } |
| 251 | |
| 252 if (is_fuchsia) { | |
| 253 sources += [ | |
| 254 "src/ports/SkFontMgr_empty_factory.cpp", | |
| 255 ] | |
| 256 } | |
| 242 } | 257 } |
| 243 | 258 |
| 244 executable("example") { | 259 executable("example") { |
| 245 configs -= unwanted_configs | 260 configs -= unwanted_configs |
| 246 | 261 |
| 247 sources = [ | 262 sources = [ |
| 248 "cmake/example.cpp", | 263 "cmake/example.cpp", |
| 249 ] | 264 ] |
| 250 deps = [ | 265 deps = [ |
| 251 ":skia", | 266 ":skia", |
| 252 ] | 267 ] |
| 253 | 268 |
| 254 libs = [] | 269 libs = [] |
| 255 if (is_mac) { | 270 if (is_mac) { |
| 256 libs += [ "OpenGL.framework" ] | 271 libs += [ "OpenGL.framework" ] |
| 257 } | 272 } |
| 258 } | 273 } |
| OLD | NEW |