blob: 495bf9c9bbce5dea7e09374cec3eaa1c0b8967b9 [file] [log] [blame]
# Copyright 2020 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Custom GN integration for VulkanMemoryAllocator.
config("vulkan_memory_allocator_config") {
include_dirs = [ "src" ]
if (is_clang) {
cflags_cc = [
"-Wno-implicit-fallthrough",
"-Wno-nullability-completeness",
"-Wno-suggest-destructor-override",
"-Wno-suggest-override",
"-Wno-unused-private-field",
"-Wno-unused-variable",
]
}
if (is_win && !is_clang) {
cflags_cc = [
"/wd4189", # local variable is initialized but not referenced
]
}
defines = [
"VMA_DYNAMIC_VULKAN_FUNCTIONS=0",
"VMA_STATIC_VULKAN_FUNCTIONS=0",
]
}
source_set("vulkan_memory_allocator") {
sources = [
"src/vk_mem_alloc.h",
"vma.cpp",
]
deps = [ "//third_party/vulkan-deps/vulkan-headers/src:vulkan_headers" ]
public_configs = [ ":vulkan_memory_allocator_config" ]
}
# TODO: remove this target when chrome and ANGLE are updated to use
# vulkan_memory_allocator
source_set("vulkan_memory_allocator_with_usage") {
public_deps = [ ":vulkan_memory_allocator" ]
}