7ac7413f08
PS1 regenerates BUILD.bazel files I suggest reviewing the deltas between PS1 and the latest PS to focus on the interesting bits. The changes here allow for a Vulkan-only build of HelloWorld based on sk_app. The toughest change was properly fetching the VisualID after removing the gl calls that used to fill that in. There are a few changes that fix resolution of Dawn header files, but those won't actually be built until a follow-on CL. Change-Id: I54fb58b5dd7ecd4313562aed401759b3eaed53c0 Bug: skia:12541 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/516999 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
97 lines
2.7 KiB
Python
97 lines
2.7 KiB
Python
load("//bazel:macros.bzl", "generated_cc_atom")
|
|
load("//bazel:cc_binary_with_flags.bzl", "cc_binary_with_flags")
|
|
|
|
cc_binary_with_flags(
|
|
name = "hello_world_gl",
|
|
srcs = [
|
|
"//example:HelloWorld_src",
|
|
],
|
|
linkopts = [
|
|
"-lX11",
|
|
"-lxcb",
|
|
"-lXau",
|
|
"-lXdmcp",
|
|
"-lGL",
|
|
],
|
|
# These flags are defined in //bazel/common_config_settings/BUILD.bazel
|
|
set_flags = {
|
|
# Use the GL backend with the normal GL standard (as opposed to WebGL or GLES)
|
|
"gpu_backend": [
|
|
"gl_backend",
|
|
],
|
|
"with_gl_standard": [
|
|
"gl_standard",
|
|
],
|
|
# Load fonts from the standard system directory (e.g. "/usr/share/fonts/")
|
|
# as defined in //src/ports/SkFontMgr_custom_directory_factory.cpp
|
|
"fontmgr_factory": [
|
|
"custom_directory_fontmgr_factory",
|
|
],
|
|
},
|
|
deps = [
|
|
"//:skia_core",
|
|
"//src/utils:json_srcs",
|
|
"//tools/sk_app",
|
|
],
|
|
)
|
|
|
|
cc_binary_with_flags(
|
|
name = "hello_world_vulkan",
|
|
srcs = [
|
|
"//example:HelloWorld_src",
|
|
],
|
|
linkopts = [
|
|
"-lX11",
|
|
"-lxcb",
|
|
"-lXau",
|
|
"-lXdmcp",
|
|
"-lX11-xcb",
|
|
],
|
|
# These flags are defined in //bazel/common_config_settings/BUILD.bazel
|
|
set_flags = {
|
|
"gpu_backend": [
|
|
"vulkan_backend",
|
|
],
|
|
# Load fonts from the standard system directory (e.g. "/usr/share/fonts/")
|
|
# as defined in //src/ports/SkFontMgr_custom_directory_factory.cpp
|
|
"fontmgr_factory": [
|
|
"custom_directory_fontmgr_factory",
|
|
],
|
|
},
|
|
deps = [
|
|
"//:skia_core",
|
|
"//src/utils:json_srcs",
|
|
"//third_party:vulkanmemoryallocator",
|
|
"//tools/sk_app",
|
|
],
|
|
)
|
|
|
|
# Everything below this line is autogenerated by gazelle using the C++ plugin built here:
|
|
# https://github.com/google/skia-buildbot/tree/main/bazel/gazelle/cpp
|
|
# These can be regenerated (if needed) by navigating to //bazel and running `make generate`
|
|
# =========================================================================================
|
|
|
|
generated_cc_atom(
|
|
name = "HelloWorld_hdr",
|
|
hdrs = ["HelloWorld.h"],
|
|
visibility = ["//:__subpackages__"],
|
|
deps = [
|
|
"//tools/sk_app:Application_hdr",
|
|
"//tools/sk_app:Window_hdr",
|
|
],
|
|
)
|
|
|
|
generated_cc_atom(
|
|
name = "HelloWorld_src",
|
|
srcs = ["HelloWorld.cpp"],
|
|
visibility = ["//:__subpackages__"],
|
|
deps = [
|
|
":HelloWorld_hdr",
|
|
"//include/core:SkCanvas_hdr",
|
|
"//include/core:SkFont_hdr",
|
|
"//include/core:SkGraphics_hdr",
|
|
"//include/core:SkSurface_hdr",
|
|
"//include/effects:SkGradientShader_hdr",
|
|
],
|
|
)
|