| 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) { |
| 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", | 170 "//third_party/zlib", |
| 167 ] | 171 ] |
| 168 | 172 |
| 169 libs = [] | 173 libs = [] |
| 170 | 174 |
| 171 sources = [] | 175 sources = [] |
| 172 sources += core_gypi.sources | 176 sources += core_gypi.sources |
| 173 sources += effects_gypi.sources | 177 sources += effects_gypi.sources |
| 174 sources += gpu_gypi.skgpu_sources | 178 sources += gpu_gypi.skgpu_sources |
| 175 sources += opts_gypi.sse2_sources | 179 sources += opts_gypi.sse2_sources |
| 176 sources += pdf_gypi.sources | 180 sources += pdf_gypi.sources |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 } | 236 } |
| 233 | 237 |
| 234 if (is_mac) { | 238 if (is_mac) { |
| 235 sources += [ | 239 sources += [ |
| 236 "src/ports/SkFontHost_mac.cpp", | 240 "src/ports/SkFontHost_mac.cpp", |
| 237 "src/ports/SkImageEncoder_CG.cpp", | 241 "src/ports/SkImageEncoder_CG.cpp", |
| 238 "src/ports/SkImageGeneratorCG.cpp", | 242 "src/ports/SkImageGeneratorCG.cpp", |
| 239 ] | 243 ] |
| 240 libs += [ "ApplicationServices.framework" ] | 244 libs += [ "ApplicationServices.framework" ] |
| 241 } | 245 } |
| 246 |
| 247 if (is_fuchsia) { |
| 248 sources += [ |
| 249 "src/ports/SkFontMgr_empty_factory.cpp", |
| 250 ] |
| 251 } |
| 242 } | 252 } |
| 243 | 253 |
| 244 executable("example") { | 254 executable("example") { |
| 245 configs -= unwanted_configs | 255 configs -= unwanted_configs |
| 246 | 256 |
| 247 sources = [ | 257 sources = [ |
| 248 "cmake/example.cpp", | 258 "cmake/example.cpp", |
| 249 ] | 259 ] |
| 250 deps = [ | 260 deps = [ |
| 251 ":skia", | 261 ":skia", |
| 252 ] | 262 ] |
| 253 | 263 |
| 254 libs = [] | 264 libs = [] |
| 255 if (is_mac) { | 265 if (is_mac) { |
| 256 libs += [ "OpenGL.framework" ] | 266 libs += [ "OpenGL.framework" ] |
| 257 } | 267 } |
| 258 } | 268 } |
| OLD | NEW |