blob: 0bfc7aa3b1814134de96b8d13f57c74271b6e723 [file] [log] [blame]
load("//bazel:cc_binary_with_flags.bzl", "cc_binary_with_flags")
load("//bazel:skia_rules.bzl", "exports_files_legacy")
licenses(["notice"])
exports_files_legacy()
cc_binary_with_flags(
name = "hello_world_gl",
testonly = True,
srcs = [
"HelloWorld.cpp",
"HelloWorld.h",
],
# 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_ganesh",
],
"with_gl_standard": [
"gl_standard",
],
},
deps = [
"//:skia_public",
] + select({
"@platforms//os:macos": ["//tools/sk_app:sk_app_objc"],
"@platforms//os:linux": ["//tools/sk_app"],
"//conditions:default": [],
}),
)
cc_binary_with_flags(
name = "hello_world_vulkan",
testonly = True,
srcs = [
"HelloWorld.cpp",
"HelloWorld.h",
],
# These flags are defined in //bazel/common_config_settings/BUILD.bazel
set_flags = {
"gpu_backend": [
"vulkan_ganesh",
],
},
deps = [
"//:skia_public",
"//tools/sk_app",
],
)
cc_binary_with_flags(
name = "hello_world_metal",
testonly = True,
srcs = [
"HelloWorld.cpp",
"HelloWorld.h",
],
# These flags are defined in //bazel/common_config_settings/BUILD.bazel
set_flags = {
"gpu_backend": [
"metal_ganesh",
],
},
deps = [
"//:skia_public",
] + select({
"@platforms//os:macos": ["//tools/sk_app:sk_app_objc"],
"//conditions:default": [],
}),
)
cc_binary_with_flags(
name = "vulkan_basic",
testonly = True,
srcs = [
"VulkanBasic.cpp",
],
# These flags are defined in //bazel/common_config_settings/BUILD.bazel
set_flags = {
"gpu_backend": [
"vulkan_ganesh",
],
},
deps = [
"//:skia_public",
"//include/third_party/vulkan",
# This DEPS is for the utility in the demo for creating a vulkan context.
# Outside clients would not need it.
"//tools/gpu/vk:testutils",
],
)