Skip to content

Commit 581d2fe

Browse files
committed
Building section
1 parent 2eeeffb commit 581d2fe

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

README.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -138,40 +138,38 @@ Vulkan-Hpp requires a C++11 capable compiler to compile. The following compilers
138138
139139
### Build steps
140140

141-
To build the local samples and tests you'll have to clone this repository and run CMake to generate the required build files
141+
1. Install dependencies:
142+
- Install CMake and git; ensure both are available from a shell.
143+
- Install the LunarG Vulkan SDK.
144+
- Optionally install clang-format ≥ 11.0 so that any generated headers can be correctly formatted.
145+
2. Open a shell which provides git and clone the repository with:
142146

143-
0. Install dependencies.
144-
- Ensure that you have CMake and git installed and accessible from a shell.
145-
- Ensure that you have installed the Vulkan SDK.
146-
- Optionally install clang-format >= 11.0 to get a nicely formatted Vulkan-Hpp header.
147-
1. Open a shell which provides git and clone the repository with:
147+
```git clone --recurse-submodules https://github.com/KhronosGroup/Vulkan-Hpp.git```
148+
3. Change the shell's working directory to the newly created `Vulkan-Hpp` directory.
149+
4. Create a build environment with CMake:
150+
```cmake -DVULKAN_HPP_SAMPLES_BUILD=ON -DVULKAN_HPP_SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP=ON -DVULKAN_HPP_TESTS_BUILD=ON -DVULKAN_HPP_TESTS_BUILD_WITH_LOCAL_VULKAN_HPP=ON -B build```
148151

149-
`git clone --recurse-submodules https://github.com/KhronosGroup/Vulkan-Hpp.git`
150-
2. Change the current directory to the newly created Vulkan-Hpp directory.
151-
3. Create a build environment with CMake:
152+
You may need to specify a generator via `-G`; for a full list of generators execute `cmake -G`.
152153

153-
`cmake -DVULKAN_HPP_SAMPLES_BUILD=ON -DVULKAN_HPP_SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP=ON -DVULKAN_HPP_TESTS_BUILD=ON -DVULKAN_HPP_TESTS_BUILD_WITH_LOCAL_VULKAN_HPP=ON -B build`
154-
155-
You might need to specify a generator via `-G`, for a full list of generators execute `cmake -G`.
156-
- To rebuild `vulkan.hpp` from the `vk.xml` XML registry file, add the
154+
To rebuild `vulkan.hpp` from the `vk.xml` XML registry file, add the
157155
`-DVULKAN_HPP_RUN_GENERATOR=ON` option to the CMake command line.
158-
4. Either open the generated project with an IDE, e.g. Visual Studio or launch the build process with `cmake --build build --parallel`.
156+
5. The generated project may be opened with an IDE like Visual Studio or CLion, or the generator, samples, and tests may be built directly from a shell:
159157

160-
Optional: To update the Vulkan-Hpp and its submodules execute `git pull --recurse-submodules`.
158+
```cmake --build build --parallel```
161159

162160
### Additional features
163161

164162
#### Formatting
165163

166-
If the program clang-format is found by CMake, the define `CLANG_FORMAT_EXECUTABLE` is set accordingly. In that case, the generated `vulkan.hpp` is formatted using the `.clang-format` file located in the root directory of this project. Otherwise, it's formatted as hard-coded in the generator.
164+
If a `clang-format` executable is found by CMake, the define `CLANG_FORMAT_EXECUTABLE` is set accordingly. In that case, the generated headers are formatted using the `.clang-format` file located in the root directory of this project; otherwise, the formatting is left as hard-coded in the generator.
167165

168166
#### Custom views of Vulkan-Hpp objects in Visual Studio
169167

170168
The file `VulkanHpp.natvis` provides a custom view on `vk::Flags` for Visual Studio. If you add this file to the user-specific natvis directory of your Visual Studio installation (%USERPROFILE%\Documents\Visual Studio 2022\Visualizers), you get `vk::Flags` nicely formatted in your debugger with all your Visual Studio projects.
171169

172170
## Breaking Changes
173171

174-
We seriously try to keep the API for all flavours of the Vulkan-Hpp constant or backwards compatible. But every now and then, some breaking changes might get in. Here is a list of those changes, sorted by version.
172+
We try to keep the API for all flavours of Vulkan-Hpp constant or backwards compatible. However, we may introduce unavoidable breaking changes, usually to fix bugs. Following is a list of those changes, arranged by version.
175173

176174
### v1.4.334
177175

0 commit comments

Comments
 (0)