[bazel] Move skcms and vulkanmemoryalloctor to subdirs
It's time to better organize //third_party/BUILD.bazel This CL starts by moving the "third party" stuff we closely own. Change-Id: I3e0be0044b790794e94f34af6202860ce0a7b7aa Bug: skia:12541 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531999 Reviewed-by: Ben Wagner <bungeman@google.com>
This commit is contained in:
parent
bd8f8686cc
commit
f4d0c2c9c8
@ -51,7 +51,7 @@ CORE_DEPS = [
|
||||
"//src/sfnt:srcs",
|
||||
"//src/shaders:srcs",
|
||||
"//src/utils:srcs",
|
||||
"//third_party:skcms",
|
||||
"//third_party/skcms",
|
||||
] + select({
|
||||
"//bazel/common_config_settings:has_gpu_backend": [
|
||||
"//src/gpu/ganesh:srcs",
|
||||
|
10
include/third_party/BUILD.bazel
vendored
10
include/third_party/BUILD.bazel
vendored
@ -1,10 +0,0 @@
|
||||
licenses(["notice"])
|
||||
|
||||
cc_library(
|
||||
name = "skias_vulkan_headers",
|
||||
includes = ["vulkan"],
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
"//include/third_party/vulkan/vulkan:vulkan_hdr",
|
||||
],
|
||||
)
|
5
include/third_party/skcms/BUILD.bazel
vendored
5
include/third_party/skcms/BUILD.bazel
vendored
@ -2,6 +2,11 @@ load("//bazel:macros.bzl", "generated_cc_atom")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files(
|
||||
["skcms.h"],
|
||||
["//third_party/skcms:__pkg__"],
|
||||
)
|
||||
|
||||
generated_cc_atom(
|
||||
name = "skcms_hdr",
|
||||
hdrs = ["skcms.h"],
|
||||
|
16
include/third_party/vulkan/BUILD.bazel
vendored
Normal file
16
include/third_party/vulkan/BUILD.bazel
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
licenses(["notice"])
|
||||
|
||||
cc_library(
|
||||
name = "skias_vulkan_headers",
|
||||
hdrs = [
|
||||
"//include/third_party/vulkan/vulkan:vk_platform.h",
|
||||
"//include/third_party/vulkan/vulkan:vulkan_core.h",
|
||||
],
|
||||
# many places include the vulkan headers as <vulkan/vulkan.h> so we
|
||||
# want to add this directory to the include search path
|
||||
includes = ["."],
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
"//include/third_party/vulkan/vulkan:vulkan_hdr",
|
||||
],
|
||||
)
|
@ -2,6 +2,14 @@ load("//bazel:macros.bzl", "generated_cc_atom")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files(
|
||||
[
|
||||
"vulkan_core.h",
|
||||
"vk_platform.h",
|
||||
],
|
||||
["//include/third_party/vulkan:__pkg__"],
|
||||
)
|
||||
|
||||
generated_cc_atom(
|
||||
name = "vk_platform_hdr",
|
||||
hdrs = ["vk_platform.h"],
|
||||
|
@ -373,7 +373,7 @@ cc_library(
|
||||
"//bazel/common_config_settings:webgl_standard": [":webgl_srcs"],
|
||||
"//conditions:default": [],
|
||||
}) + select({
|
||||
"//bazel/common_config_settings:vulkan_with_vma": ["//third_party:vulkanmemoryallocator"],
|
||||
"//bazel/common_config_settings:vulkan_with_vma": ["//third_party/vulkanmemoryallocator"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
)
|
||||
|
@ -8,7 +8,7 @@ generated_cc_atom(
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
"//include/gpu/vk:GrVkMemoryAllocator_hdr",
|
||||
"//third_party:vulkanmemoryallocator",
|
||||
"//third_party/vulkanmemoryallocator",
|
||||
],
|
||||
)
|
||||
|
||||
|
36
third_party/BUILD.bazel
vendored
36
third_party/BUILD.bazel
vendored
@ -2,22 +2,6 @@ load("//bazel:macros.bzl", "py_binary", "requirement", "selects")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
cc_library(
|
||||
name = "skcms",
|
||||
srcs = [
|
||||
"skcms/skcms.cc",
|
||||
"skcms/skcms_internal.h",
|
||||
"skcms/src/Transform_inl.h",
|
||||
],
|
||||
copts = [
|
||||
"-isystem include/third_party/skcms/",
|
||||
],
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
"//include/third_party/skcms:skcms_hdr",
|
||||
],
|
||||
)
|
||||
|
||||
LIBPNG_SRCS = [
|
||||
"externals/libpng/png.c",
|
||||
"externals/libpng/pngconf.h",
|
||||
@ -2433,24 +2417,6 @@ cc_library(
|
||||
visibility = ["//:__subpackages__"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "vulkanmemoryallocator",
|
||||
srcs = [
|
||||
"vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp",
|
||||
"vulkanmemoryallocator/include/vk_mem_alloc.h",
|
||||
],
|
||||
hdrs = [
|
||||
"vulkanmemoryallocator/GrVulkanMemoryAllocator.h",
|
||||
],
|
||||
includes = [
|
||||
"vulkanmemoryallocator",
|
||||
],
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
"//include/third_party:skias_vulkan_headers",
|
||||
],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "dawn_json_generator",
|
||||
srcs = [
|
||||
@ -2955,7 +2921,7 @@ cc_library(
|
||||
":tint",
|
||||
"@abseil_cpp//absl/strings:str_format",
|
||||
":vulkan_headers",
|
||||
":vulkan_tools"
|
||||
":vulkan_tools",
|
||||
],
|
||||
)
|
||||
|
||||
|
4
third_party/file_map_for_bazel.json
vendored
4
third_party/file_map_for_bazel.json
vendored
@ -72,7 +72,7 @@
|
||||
"vulkan_macos.h": "//include/third_party/vulkan/vulkan:vulkan_macos_hdr",
|
||||
"vulkan_win32.h": "//include/third_party/vulkan/vulkan:vulkan_win32_hdr",
|
||||
"vulkan_xcb.h": "//include/third_party/vulkan/vulkan:vulkan_xcb_hdr",
|
||||
"vulkan/vulkan.h": "//include/third_party:skias_vulkan_headers",
|
||||
"vulkan/vulkan.h": "//include/third_party/vulkan:skias_vulkan_headers",
|
||||
|
||||
"vulkan_beta.h": "SK_GAZELLE_IGNORE not actually included by us",
|
||||
"vulkan_directfb.h": "SK_GAZELLE_IGNORE not actually included by us",
|
||||
@ -85,7 +85,7 @@
|
||||
"vulkan_xlib.h": "SK_GAZELLE_IGNORE not actually included by us",
|
||||
"vulkan_xlib_xrandr.h": "SK_GAZELLE_IGNORE not actually included by us",
|
||||
|
||||
"GrVulkanMemoryAllocator.h": "//third_party:vulkanmemoryallocator",
|
||||
"GrVulkanMemoryAllocator.h": "//third_party/vulkanmemoryallocator",
|
||||
|
||||
"wuffs-v0.3.c": "//third_party:wuffs",
|
||||
|
||||
|
21
third_party/skcms/BUILD.bazel
vendored
Normal file
21
third_party/skcms/BUILD.bazel
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
licenses(["notice"])
|
||||
|
||||
cc_library(
|
||||
name = "skcms",
|
||||
srcs = [
|
||||
"skcms.cc",
|
||||
"skcms_internal.h",
|
||||
],
|
||||
hdrs = [
|
||||
"//include/third_party/skcms:skcms.h",
|
||||
],
|
||||
copts = [
|
||||
# We cannot use includes because this header is not in this directory.
|
||||
"-isystem include/third_party/skcms/",
|
||||
],
|
||||
# This header does not compile on its own and is meant to be included from skcms.cc
|
||||
textual_hdrs = [
|
||||
"src/Transform_inl.h",
|
||||
],
|
||||
visibility = ["//:__subpackages__"],
|
||||
)
|
20
third_party/vulkanmemoryallocator/BUILD.bazel
vendored
Normal file
20
third_party/vulkanmemoryallocator/BUILD.bazel
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
licenses(["notice"])
|
||||
|
||||
cc_library(
|
||||
name = "vulkanmemoryallocator",
|
||||
srcs = [
|
||||
"GrVulkanMemoryAllocator.cpp",
|
||||
# TODO(kjlubick) update after https://skia-review.googlesource.com/c/skia/+/531318 lands
|
||||
"include/vk_mem_alloc.h",
|
||||
],
|
||||
hdrs = [
|
||||
"GrVulkanMemoryAllocator.h",
|
||||
],
|
||||
includes = [
|
||||
".",
|
||||
],
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
"//include/third_party/vulkan:skias_vulkan_headers",
|
||||
],
|
||||
)
|
@ -8,7 +8,7 @@ generated_cc_atom(
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
"//include/core:SkTypes_hdr",
|
||||
"//include/third_party:skias_vulkan_headers",
|
||||
"//include/third_party/vulkan:skias_vulkan_headers",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -8,7 +8,7 @@ generated_cc_atom(
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
":WindowContextFactory_unix_hdr",
|
||||
"//include/third_party:skias_vulkan_headers",
|
||||
"//include/third_party/vulkan:skias_vulkan_headers",
|
||||
"//src/ports:SkOSLibrary_hdr",
|
||||
"//third_party:dawn",
|
||||
"//tools/gpu/vk:VkTestUtils_hdr",
|
||||
|
@ -11,7 +11,7 @@ cc_binary(
|
||||
":skdiff_src",
|
||||
":skdiff_utils_src",
|
||||
"//:skia_core",
|
||||
"//third_party:skcms",
|
||||
"//third_party/skcms",
|
||||
"//tools:Resources_src",
|
||||
"//tools:ToolUtils_src",
|
||||
"//tools/flags:CommandLineFlags_src",
|
||||
|
Loading…
Reference in New Issue
Block a user