blob: 495bf9c9bbce5dea7e09374cec3eaa1c0b8967b9 [file] [log] [blame]
Jamie Madilldac952e2020-05-05 12:17:44 -04001# Copyright 2020 The ANGLE Project Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4#
5# Custom GN integration for VulkanMemoryAllocator.
6
7config("vulkan_memory_allocator_config") {
8 include_dirs = [ "src" ]
9 if (is_clang) {
10 cflags_cc = [
11 "-Wno-implicit-fallthrough",
12 "-Wno-nullability-completeness",
Jamie Madill67dd6ca2020-08-26 00:58:13 -040013 "-Wno-suggest-destructor-override",
14 "-Wno-suggest-override",
Jamie Madilldac952e2020-05-05 12:17:44 -040015 "-Wno-unused-private-field",
16 "-Wno-unused-variable",
17 ]
18 }
19 if (is_win && !is_clang) {
20 cflags_cc = [
21 "/wd4189", # local variable is initialized but not referenced
22 ]
23 }
Peng Huangc039c222021-01-27 15:23:45 -050024 defines = [
25 "VMA_DYNAMIC_VULKAN_FUNCTIONS=0",
26 "VMA_STATIC_VULKAN_FUNCTIONS=0",
27 ]
Jamie Madilldac952e2020-05-05 12:17:44 -040028}
29
30source_set("vulkan_memory_allocator") {
Peng Huangc039c222021-01-27 15:23:45 -050031 sources = [
Peng Huangc039c222021-01-27 15:23:45 -050032 "src/vk_mem_alloc.h",
Peng Huangb1d65a22021-01-27 20:00:45 -050033 "vma.cpp",
Peng Huangc039c222021-01-27 15:23:45 -050034 ]
Peng Huangb1d65a22021-01-27 20:00:45 -050035 deps = [ "//third_party/vulkan-deps/vulkan-headers/src:vulkan_headers" ]
Peng Huangc039c222021-01-27 15:23:45 -050036 public_configs = [ ":vulkan_memory_allocator_config" ]
37}
Peng Huang77a34742021-02-12 10:52:56 -050038
39# TODO: remove this target when chrome and ANGLE are updated to use
40# vulkan_memory_allocator
41source_set("vulkan_memory_allocator_with_usage") {
42 public_deps = [ ":vulkan_memory_allocator" ]
43}