1# A real client should download a pinned version of Skia such as: 2# 3# load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") 4# 5# git_repository( 6# name = "skia", 7# commit = "8b051126be8ae6c3e718bd3817eebb867b2fd612", 8# remote = "https://skia.googlesource.com/skia", 9# ) 10# 11# We use local_repository to allow us to test Skia at head as if it were checked 12# out via git_repository. 13local_repository( 14 name = "skia", 15 path = "../..", 16) 17 18# Clients need to define a target here named "skia_user_config" that points to a 19# Bazel workspace with: 20# - a user_config cc_library rule that has SkiaUserConfig.h available and 21# the SK_USE_BAZEL_CONFIG_HEADER define set. 22# - A copts.bzl file with at least two string lists: DEFAULT_COPTS, DEFAULT_OBJC_COPTS 23# These lists can be empty if you want to use the toolchain's default. 24# - a linkopts.bzl file with at least the string list DEFAULT_LINKOPTS 25# This list can be empty if you want to use the toolchain's default. 26local_repository( 27 name = "skia_user_config", 28 path = "custom_skia_config", 29) 30 31# These two workspace functions will add dependencies for Skia's Bazel rules 32# (e.g. @bazel_skylib) and the C++ dependencies (e.g. @libpng) 33load("@skia//bazel:deps.bzl", "bazel_deps", "c_plus_plus_deps", "header_based_configs") 34 35# Be sure to call the functions. 36bazel_deps() 37 38c_plus_plus_deps() 39 40header_based_configs() 41 42############################################################################## 43# Everything below here is not required for Skia, but is required for the sample 44# rules based on Skia. 45load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 46 47# https://github.com/bazelbuild/rules_cc 48http_archive( 49 name = "rules_cc", 50 sha256 = "ae46b722a8b8e9b62170f83bfb040cbf12adb732144e689985a66b26410a7d6f", 51 strip_prefix = "rules_cc-0.0.8", 52 urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.8/rules_cc-0.0.8.tar.gz"], 53) 54