46eaab3959
Ran the following commands: find -name "BUILD.bazel" -exec sed -i -e '1iload("//bazel:macros.bzl", "cc_library", "exports_files_legacy")\nexports_files_legacy()' {} + buildifier --lint=fix --mode=fix -r . This had the effect of making sure we can export all of our files in G3 (until we no longer have legacy targets) and making all of our cc_libraries shim-able. bazel/macros.bzl has the human-contributed changes, the rest were mechanical. Change-Id: I8e24e30e74b038cfd072cdbe4078bfd1d213dd46 Bug: skia:13211 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535359 Reviewed-by: Ben Wagner <bungeman@google.com>
92 lines
2.4 KiB
Python
92 lines
2.4 KiB
Python
load("//bazel:macros.bzl", "cc_library", "exports_files_legacy", "gazelle", "select_multi", "selects")
|
|
|
|
exports_files_legacy()
|
|
|
|
licenses(["notice"])
|
|
|
|
package(default_visibility = ["//:__subpackages__"])
|
|
|
|
selects.config_setting_group(
|
|
name = "needs_jpeg",
|
|
match_any = [
|
|
"//bazel/common_config_settings:raw_decode_codec",
|
|
"//bazel/common_config_settings:jpeg_decode_codec",
|
|
"//bazel/common_config_settings:jpeg_encode_codec",
|
|
],
|
|
)
|
|
|
|
selects.config_setting_group(
|
|
name = "needs_png",
|
|
match_any = [
|
|
"//bazel/common_config_settings:png_decode_codec",
|
|
"//bazel/common_config_settings:png_encode_codec",
|
|
],
|
|
)
|
|
|
|
selects.config_setting_group(
|
|
name = "needs_webp",
|
|
match_any = [
|
|
"//bazel/common_config_settings:webp_decode_codec",
|
|
"//bazel/common_config_settings:webp_encode_codec",
|
|
],
|
|
)
|
|
|
|
selects.config_setting_group(
|
|
name = "any_freetype_fontmgr",
|
|
match_any = [
|
|
"//bazel/common_config_settings:custom_directory_fontmgr",
|
|
"//bazel/common_config_settings:custom_embedded_fontmgr",
|
|
"//bazel/common_config_settings:custom_empty_fontmgr",
|
|
],
|
|
)
|
|
|
|
CORE_DEPS = [
|
|
"//src/android:srcs",
|
|
"//src/codec:srcs",
|
|
"//src/core:srcs",
|
|
"//src/image:srcs",
|
|
"//src/images:srcs",
|
|
"//src/effects:srcs",
|
|
"//src/opts:srcs",
|
|
"//src/pathops:srcs",
|
|
"//src/ports:srcs",
|
|
"//src/sfnt:srcs",
|
|
"//src/shaders:srcs",
|
|
"//src/utils:srcs",
|
|
"//third_party/skcms",
|
|
] + select({
|
|
"//bazel/common_config_settings:has_gpu_backend": [
|
|
"//src/gpu/ganesh:srcs",
|
|
"//src/sksl:srcs",
|
|
# TODO(kjlubick) should mock be test only?
|
|
"//src/gpu/ganesh:mock_srcs",
|
|
],
|
|
"//conditions:default": [],
|
|
}) + select_multi(
|
|
{
|
|
"//bazel/common_config_settings:gif_decode_codec": ["//third_party:wuffs"],
|
|
":needs_png": ["//third_party:libpng"],
|
|
"//bazel/common_config_settings:raw_decode_codec": [
|
|
"//third_party:piex",
|
|
"//third_party:dng_sdk",
|
|
],
|
|
":needs_webp": ["//third_party:libwebp"],
|
|
":needs_jpeg": ["//third_party:libjpeg-turbo"],
|
|
},
|
|
default = [],
|
|
) + select({
|
|
":any_freetype_fontmgr": [
|
|
"//third_party:freetype2",
|
|
],
|
|
"//conditions:default": [],
|
|
})
|
|
|
|
cc_library(
|
|
name = "skia_core",
|
|
textual_hdrs = ["//src/sksl:txts"],
|
|
deps = CORE_DEPS,
|
|
)
|
|
|
|
# gazelle:prefix go.skia.org/skia
|
|
gazelle(name = "gazelle")
|