104 lines
2.6 KiB
Python
104 lines
2.6 KiB
Python
load("//bazel:skia_rules.bzl", "exports_files_legacy", "select_multi", "skia_cc_deps", "skia_cc_library", "skia_objc_library")
|
|
load("@skia_user_config//:copts.bzl", "DEFAULT_OBJC_COPTS")
|
|
|
|
licenses(["notice"])
|
|
|
|
exports_files_legacy()
|
|
|
|
skia_cc_library(
|
|
name = "sk_app",
|
|
testonly = True,
|
|
srcs = [
|
|
"Window.cpp",
|
|
"WindowContext.cpp",
|
|
"RasterWindowContext.h",
|
|
] + select_multi(
|
|
{
|
|
"//src/gpu:dawn_backend": [
|
|
"DawnWindowContext.h",
|
|
"DawnWindowContext.cpp",
|
|
],
|
|
"//src/gpu:gl_backend": [
|
|
"GLWindowContext.cpp",
|
|
"GLWindowContext.h",
|
|
],
|
|
"//src/gpu:vulkan_backend": [
|
|
"VulkanWindowContext.h",
|
|
"VulkanWindowContext.cpp",
|
|
],
|
|
},
|
|
) + select({
|
|
"@platforms//os:linux": ["//tools/sk_app/unix:srcs"],
|
|
"//conditions:default": [],
|
|
# TODO(kjlubick) add Windows/Mac support
|
|
}),
|
|
hdrs = [
|
|
"Application.h",
|
|
"DisplayParams.h",
|
|
"Window.h",
|
|
"WindowContext.h",
|
|
],
|
|
visibility = ["//:__subpackages__"],
|
|
deps = [
|
|
"//:skia_internal",
|
|
"//tools/skui",
|
|
"//tools/timer",
|
|
] + select({
|
|
"@platforms//os:linux": ["//tools/sk_app/unix:deps"],
|
|
"//conditions:default": [],
|
|
}),
|
|
)
|
|
|
|
skia_objc_library(
|
|
name = "sk_app_objc",
|
|
testonly = True,
|
|
srcs = [
|
|
"Window.cpp",
|
|
"WindowContext.cpp",
|
|
"RasterWindowContext.h",
|
|
] + select_multi(
|
|
{
|
|
# TODO(kjlubick, jmbetancourt) Graphite and Metal backend
|
|
"//src/gpu:dawn_backend": [
|
|
"DawnWindowContext.h",
|
|
"DawnWindowContext.cpp",
|
|
],
|
|
"//src/gpu:gl_backend": [
|
|
"GLWindowContext.cpp",
|
|
"GLWindowContext.h",
|
|
],
|
|
},
|
|
) + select({
|
|
"@platforms//os:macos": ["//tools/sk_app/mac:srcs"],
|
|
"//conditions:default": [],
|
|
# TODO ios support
|
|
}),
|
|
hdrs = [
|
|
"Application.h",
|
|
"DisplayParams.h",
|
|
"Window.h",
|
|
"WindowContext.h",
|
|
],
|
|
copts = DEFAULT_OBJC_COPTS + [
|
|
"-Wno-deprecated-declarations",
|
|
"-DGL_SILENCE_DEPRECATION",
|
|
],
|
|
visibility = ["//:__subpackages__"],
|
|
deps = [
|
|
":platform_deps",
|
|
"//:skia_internal",
|
|
"//tools/skui",
|
|
"//tools/timer",
|
|
],
|
|
)
|
|
|
|
skia_cc_deps(
|
|
name = "platform_deps",
|
|
testonly = True,
|
|
visibility = ["//visibility:private"],
|
|
deps = select({
|
|
"@platforms//os:macos": ["//tools/sk_app/mac:deps"],
|
|
"//conditions:default": [],
|
|
}),
|
|
)
|