cmake: Update minimum version to 3.22.1
[KhronosGroup/Vulkan-Headers.git] / BUILD.md
bloba9ccd98fed2c4a245dc58db81634eb102ec1658a
1 <!--
2 Copyright 2018-2023 The Khronos Group Inc.
4 SPDX-License-Identifier: Apache-2.0
5 -->
7 # Build Instructions
9 Instructions for building this repository.
11 ```bash
12 git clone https://github.com/KhronosGroup/Vulkan-Headers.git
14 cd Vulkan-Headers/
16 # Configure the project
17 cmake -S . -B build/
19 # Because Vulkan-Headers is header only we don't need to build anything.
20 # Users can install it where they need to.
21 cmake --install build --prefix build/install
22 ```
24 See the official [CMake documentation](https://cmake.org/cmake/help/latest/index.html) for more information.
26 ## Installed Files
28 The `install` target installs the following files under the directory
29 indicated by *install_dir*:
31 - *install_dir*`/include/vulkan` : The header files found in the
32  `include/vulkan` directory of this repository
33 - *install_dir*`/share/cmake/VulkanHeaders`: The CMake config files needed
34   for find_package support
35 - *install_dir*`/share/vulkan/registry` : The registry files found in the
36   `registry` directory of this repository
38 ## Usage in CMake
40 ```cmake
41 find_package(VulkanHeaders REQUIRED CONFIG)
43 target_link_libraries(foobar PRIVATE Vulkan::Headers)
45 message(STATUS "Vulkan Headers Version: ${VulkanHeaders_VERSION}")
46 ```