1load("//bazel:macros.bzl", "generated_cc_atom") 2load("//bazel:cc_binary_with_flags.bzl", "cc_binary_with_flags") 3 4cc_binary_with_flags( 5 name = "hello_world", 6 srcs = [ 7 "//example:HelloWorld_src", 8 ], 9 linkopts = [ 10 "-lX11", 11 "-lxcb", 12 "-lXau", 13 "-lXdmcp", 14 "-lGL", 15 ], 16 # These flags are defined in //bazel/common_config_settings/BUILD.bazel 17 set_flags = { 18 # Use the GL backend with the normal GL standard (as opposed to WebGL or GLES) 19 "gpu_backend": [ 20 "gl_backend", 21 ], 22 "with_gl_standard": [ 23 "gl_standard", 24 ], 25 # Load fonts from the standard system directory (e.g. "/usr/share/fonts/") 26 # as defined in //src/ports/SkFontMgr_custom_directory_factory.cpp 27 "fontmgr_factory": [ 28 "custom_directory_fontmgr_factory", 29 ], 30 }, 31 deps = [ 32 "//:skia_core", 33 "//src/utils:json_srcs", 34 "//tools/sk_app", 35 ], 36) 37 38# Everything below this line is autogenerated by gazelle using the C++ plugin built here: 39# https://github.com/google/skia-buildbot/tree/main/bazel/gazelle/cpp 40# These can be regenerated (if needed) by navigating to //bazel and running `make generate` 41# ========================================================================================= 42 43generated_cc_atom( 44 name = "HelloWorld_hdr", 45 hdrs = ["HelloWorld.h"], 46 visibility = ["//:__subpackages__"], 47 deps = [ 48 "//tools/sk_app:Application_hdr", 49 "//tools/sk_app:Window_hdr", 50 ], 51) 52 53generated_cc_atom( 54 name = "HelloWorld_src", 55 srcs = ["HelloWorld.cpp"], 56 visibility = ["//:__subpackages__"], 57 deps = [ 58 ":HelloWorld_hdr", 59 "//include/core:SkCanvas_hdr", 60 "//include/core:SkFont_hdr", 61 "//include/core:SkGraphics_hdr", 62 "//include/core:SkSurface_hdr", 63 "//include/effects:SkGradientShader_hdr", 64 ], 65) 66