FindVulkan
Added in version 3.7.
Finds Vulkan, a low-overhead, cross-platform 3D graphics and computing API, along with related development tools typically provided by the Vulkan SDK:
find_package(Vulkan [<version>] [COMPONENTS <components>...] [...])
Vulkan includes commonly used utilities such as shader compilers and SPIR-V tools (e.g., DXC, glslc, glslang, etc.) that support Vulkan-based development workflows.
Components
Added in version 3.24.
This module supports several optional components that can be specified with the find_package() command:
find_package(Vulkan [COMPONENTS <components>...])
Each component provides a corresponding imported target. Supported components include:
-
glslc -
Added in version 3.24.
Finds the SPIR-V compiler. This optional component is always implied automatically for backward compatibility, even if not requested.
-
glslangValidator -
Added in version 3.24.
Finds the
glslangValidatortool that is used to compile GLSL and HLSL shaders into SPIR-V. This optional component is always implied automatically for backward compatibility, even if not requested. -
glslang -
Added in version 3.24.
Finds the Khronos-reference front-end shader parser and SPIR-V code generation library (
glslang). -
shaderc_combined -
Added in version 3.24.
Finds the Google static library used for Vulkan shader compilation.
-
SPIRV-Tools -
Added in version 3.24.
Finds Khronos library for analyzing and transforming SPIR-V modules.
-
MoltenVK -
Added in version 3.24.
Finds the Khronos MoltenVK library, which is available on macOS, and implements a subset of Vulkan API over Apple Metal graphics framework.
-
dxc -
Added in version 3.25.
Finds the DirectX Shader Compiler (DXC), including the library and command-line tool. Note that Visual Studio also provides a DXC tool, but the version included with the Vulkan SDK is typically required for Vulkan development, as it has Vulkan capability enabled.
-
volk -
Added in version 3.25.
Finds the Vulkan meta-loader
volklibrary.
Imported Targets
This module provides the following Imported Targets:
-
Vulkan::Vulkan -
Target encapsulating the main Vulkan library usage requirements, available if Vulkan is found.
-
Vulkan::glslc -
Added in version 3.19.
Imported executable target encapsulating the GLSLC SPIR-V compiler usage requirements, available if
glslcis found. -
Vulkan::Headers -
Added in version 3.21.
Target encapsulating the usage requirements needed to include Vulkan headers. It provides only the include directories and does not link to any library. This is useful for applications that load the Vulkan library dynamically at runtime. This target is available if Vulkan is found.
-
Vulkan::glslangValidator -
Added in version 3.21.
Imported executable target encapsulating the
glslangValidatorusage requirements, available if this tool is found. -
Vulkan::glslang -
Added in version 3.24.
Target encapsulating the
glslanglibrary usage requirements, available ifglslangis found in the SDK. -
Vulkan::shaderc_combined -
Added in version 3.24.
Target encapsulating the
shaderc_combinedlibrary usage requirements, available if this library is found in the SDK. -
Vulkan::SPIRV-Tools -
Added in version 3.24.
Target encapsulating the SPIRV-Tools library usage requirements, available if this library is found in the SDK.
-
Vulkan::MoltenVK -
Added in version 3.24.
Target encapsulating the MoltenVK library usage requirements, available if this library is found in the SDK.
-
Vulkan::volk -
Added in version 3.25.
Target encapsulating the
volklibrary usage requirements, available ifvolkis found in the SDK. -
Vulkan::dxc_lib -
Added in version 3.25.
Target encapsulating the usage requirements for the DirectX shader compiler library, available if DXC library is found in the SDK.
-
Vulkan::dxc_exe -
Added in version 3.25.
Imported executable target providing usage requirements for the DirectX shader compiler CLI tool, available if SDK has this tool.
Result Variables
This module defines the following variables:
-
Vulkan_FOUND -
Boolean indicating whether (the requested version of) Vulkan and all required components were found.
-
Vulkan_VERSION -
Added in version 3.23.
The version of Vulkan found. Value is retrieved from
vulkan/vulkan_core.h. -
Vulkan_INCLUDE_DIRS -
Include directories needed to use the main Vulkan library.
-
Vulkan_LIBRARIES -
Libraries needed to link against to use the main Vulkan library.
-
Vulkan_glslc_FOUND -
Added in version 3.24.
Boolean indicating whether the SDK provides the
glslcexecutable. -
Vulkan_glslangValidator_FOUND -
Added in version 3.24.
Boolean indicating whether the SDK provides the
glslangValidatorexecutable. -
Vulkan_glslang_FOUND -
Added in version 3.24.
Boolean indicating whether the SDK provides the
glslanglibrary. -
Vulkan_shaderc_combined_FOUND -
Added in version 3.24.
Boolean indicating whether the SDK provides the
shaderc_combinedlibrary. -
Vulkan_SPIRV-Tools_FOUND -
Added in version 3.24.
Boolean indicating whether the SDK provides the SPIRV-Tools library.
-
Vulkan_MoltenVK_FOUND -
Added in version 3.24.
Boolean indicating whether the SDK provides the MoltenVK library.
-
Vulkan_volk_FOUND -
Added in version 3.25.
Boolean indicating whether the SDK provides the volk library.
-
Vulkan_dxc_lib_FOUND -
Added in version 3.25.
Boolean indicating whether the SDK provides the DirectX shader compiler library.
-
Vulkan_dxc_exe_FOUND -
Added in version 3.25.
Boolean indicating whether the SDK provides the DirectX shader compiler CLI tool.
Cache Variables
The following cache variables may also be set:
-
Vulkan_INCLUDE_DIR -
The directory containing Vulkan headers.
-
Vulkan_LIBRARY -
The path to the Vulkan library.
-
Vulkan_GLSLC_EXECUTABLE -
Added in version 3.19.
The path to the GLSL SPIR-V compiler.
-
Vulkan_GLSLANG_VALIDATOR_EXECUTABLE -
Added in version 3.21.
The path to the
glslangValidatortool. -
Vulkan_glslang_LIBRARY -
Added in version 3.24.
The path to the
glslanglibrary. -
Vulkan_shaderc_combined_LIBRARY -
Added in version 3.24.
The path to the
shaderc_combinedlibrary. -
Vulkan_SPIRV-Tools_LIBRARY -
Added in version 3.24.
The path to the SPIRV-Tools library.
-
Vulkan_MoltenVK_LIBRARY -
Added in version 3.24.
The path to the MoltenVK library.
-
Vulkan_volk_LIBRARY -
Added in version 3.25.
The path to the
volklibrary. -
Vulkan_dxc_LIBRARY -
Added in version 3.25.
The path to the DirectX shader compiler library.
-
Vulkan_dxc_EXECUTABLE -
Added in version 3.25.
The path to the DirectX shader compiler CLI tool.
-
Vulkan_Layer_API_DUMP_LIBRARY -
Added in version 4.4.
Path to the
api_dumpVulkan Layer library. -
Vulkan_Layer_CRASH_DIAGNOSTIC_LIBRARY -
Added in version 4.4.
Path to the
crash_diagnosticVulkan Layer library. -
Vulkan_Layer_GFXRECONSTRUCT_LIBRARY -
Added in version 4.4.
Path to the
gfxreconstructVulkan Layer library. -
Vulkan_Layer_KHRONOS_PROFILES_LIBRARY -
Added in version 4.4.
Path to the
khronos_profilesVulkan Layer library. -
Vulkan_Layer_KHRONOS_SHADER_OBJECT_LIBRARY -
Added in version 4.4.
Path to the
khronos_shader_objectVulkan Layer library. -
Vulkan_Layer_KHRONOS_SYNCHRONIZATION2_LIBRARY -
Added in version 4.4.
Path to the
khronos_synchronization2Vulkan Layer library. -
Vulkan_Layer_KHRONOS_VALIDATION_LIBRARY -
Added in version 4.4.
Path to the
khronos_validationVulkan Layer library. -
Vulkan_Layer_MONITOR_LIBRARY -
Added in version 4.4.
Path to the
monitorVulkan Layer library. -
Vulkan_Layer_SCREENSHOT_LIBRARY -
Added in version 4.4.
Path to the
screenshotVulkan Layer library.
Hints
This module accepts the following variables:
-
VULKAN_SDK -
This environment variable can be optionally set to specify the location of the Vulkan SDK root directory for the given architecture. It is typically set by sourcing the toplevel
setup-env.shscript of the Vulkan SDK directory into the shell environment.
Examples
Finding the Vulkan library and linking it to a project target:
find_package(Vulkan) target_link_libraries(project_target PRIVATE Vulkan::Vulkan)
Finding the Vulkan library along with additional components:
find_package(Vulkan COMPONENTS volk) target_link_libraries(project_target PRIVATE Vulkan::Vulkan Vulkan::volk)
© 2000–2026 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/latest/module/FindVulkan.html