blob: 527fc5a424cb1f341cf4b11062bbedc5ebf32d79 [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.
# This could be set via build_overrides if necessary
vulkan_memory_allocator_vulkan_dep = "../../src/third_party/volk"
config("vulkan_memory_allocator_config") {
include_dirs = [ "src" ]
if (is_clang) {
cflags_cc = [
"-Wno-implicit-fallthrough",
"-Wno-unused-variable",
]
}
if (is_win && !is_clang) {
cflags_cc = [
"/wd4189", # local variable is initialized but not referenced
]
}
}
source_set("vulkan_memory_allocator") {
sources = [
# vk_mem_alloc.cpp allows the functions to be compiled into an object file
# and the consumers of vulkan_memory_allocator to use the prototypes.
"src/vk_mem_alloc.h",
]
public_deps = [ "$vulkan_memory_allocator_vulkan_dep" ]
defines = [ "VMA_IMPLEMENTATION" ]
public_configs = [ ":vulkan_memory_allocator_config" ]
}