blender/extern/vulkan_memory_allocator/CMakeLists.txt
Jeroen Bakker 7bbadd3b38 Vulkan: On demand loading of the Vulkan Loader (VOLK)
This PR replaces the statically linked vulkan loader with dynamic loading
of vulkan loader. This is more in line how other software integrate vulkan
and makes it easier for vendors to help out with issues.

Volk has been placed in its own namespace (volk) this to overcome issues
as USD/Hydra still loads the vulkan loader statically. These changes had
already been applied upstream a year ago.

volk is added to extern as it requires an application specific compilation
unit for configuration.

Pull Request: https://projects.blender.org/blender/blender/pulls/139630
2026-06-30 15:50:57 +02:00

29 lines
591 B
CMake

# SPDX-FileCopyrightText: 2022 Blender Foundation
#
# SPDX-License-Identifier: GPL-2.0-or-later
set(INC
PUBLIC .
)
set(INC_SYS
)
set(SRC
vk_mem_alloc_impl.cc
vk_mem_alloc.h
)
set(LIB
PUBLIC bf::extern::volk
)
blender_add_lib(extern_vulkan_memory_allocator "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
add_library(bf::extern::vulkan_memory_allocator ALIAS extern_vulkan_memory_allocator)
if((CMAKE_C_COMPILER_ID STREQUAL "GNU") OR (CMAKE_C_COMPILER_ID MATCHES "Clang"))
target_compile_options(extern_vulkan_memory_allocator
PUBLIC "-Wno-nullability-completeness"
)
endif()