mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Use and recommend clang-format-11, not clang-format-10
Also: - Fix the numbered list formatting in the README.md - Describe the -DVULKAN_HPP_RUN_GENERATOR=ON option Fixes: #1116
This commit is contained in:
parent
95fbfbe36d
commit
938d9e60e0
@ -43,12 +43,12 @@ if(CLANG_FORMAT_EXECUTABLE)
|
|||||||
else ()
|
else ()
|
||||||
message(STATUS " Found clang-format version <" ${clangFormatVersion} ">.")
|
message(STATUS " Found clang-format version <" ${clangFormatVersion} ">.")
|
||||||
add_definitions(-DCLANG_FORMAT_EXECUTABLE="${CLANG_FORMAT_EXECUTABLE}")
|
add_definitions(-DCLANG_FORMAT_EXECUTABLE="${CLANG_FORMAT_EXECUTABLE}")
|
||||||
if (clangFormatVersion VERSION_LESS 10.0.0)
|
if (clangFormatVersion VERSION_LESS 11.0.0)
|
||||||
message(STATUS " Using .clang-format version 7." )
|
message(STATUS " Using .clang-format version 7." )
|
||||||
file(READ ".clang-format_7" clangFormat)
|
file(READ ".clang-format_7" clangFormat)
|
||||||
else ()
|
else ()
|
||||||
message(STATUS " Using .clang-format version 10." )
|
message(STATUS " Using .clang-format version 11." )
|
||||||
file(READ ".clang-format_10" clangFormat)
|
file(READ ".clang-format_11" clangFormat)
|
||||||
endif ()
|
endif ()
|
||||||
file(WRITE ".clang-format" ${clangFormat})
|
file(WRITE ".clang-format" ${clangFormat})
|
||||||
endif()
|
endif()
|
||||||
|
25
README.md
25
README.md
@ -22,17 +22,22 @@ Vulkan-Hpp requires a C++11 capable compiler to compile. The following compilers
|
|||||||
|
|
||||||
To build the local samples and tests you'll have to clone this repository and run CMake to generate the required build files
|
To build the local samples and tests you'll have to clone this repository and run CMake to generate the required build files
|
||||||
|
|
||||||
0.) Ensure that you have CMake and git installed and accessible from a shell. Ensure that you have installed the Vulkan SDK. Optionally install clang-format >= 10.0 to get a nicely formatted Vulkan-Hpp header.
|
0. Install dependencies.
|
||||||
1.) Open a shell which provides git and clone the repository with:
|
* Ensure that you have CMake and git installed and accessible from a shell.
|
||||||
```git clone --recurse-submodules https://github.com/KhronosGroup/Vulkan-Hpp.git```
|
* Ensure that you have installed the Vulkan SDK.
|
||||||
2.) Change the current directory to the newly created Vulkan-Hpp directory.
|
* Optionally install clang-format >= 11.0 to get a nicely formatted Vulkan-Hpp header.
|
||||||
3.) Create a new folder named ```build``` and change the current directory to the newly created folder.
|
1. Open a shell which provides git and clone the repository with:
|
||||||
4.) Create a build environment with CMake
|
```git clone --recurse-submodules https://github.com/KhronosGroup/Vulkan-Hpp.git```
|
||||||
```cmake -D DSAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP=ON -DSAMPLES_BUILD=ON -DTESTS_BUILD_WITH_LOCAL_VULKAN_HPP=ON -DTESTS_BUILD=ON -G "<generator>" ..```
|
2. Change the current directory to the newly created Vulkan-Hpp directory.
|
||||||
For a full list of generators execute ```cmake -G```.
|
3. Create a new folder named ```build``` and change the current directory to the newly created folder.
|
||||||
5.) Either open the generated project with an IDE, e.g. Visual Studio or launch the build process with ```cmake --build .```.
|
4. Create a build environment with CMake
|
||||||
|
```cmake -D DSAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP=ON -DSAMPLES_BUILD=ON -DTESTS_BUILD_WITH_LOCAL_VULKAN_HPP=ON -DTESTS_BUILD=ON -G "<generator>" ..```
|
||||||
|
For a full list of generators execute ```cmake -G```.
|
||||||
|
* To rebuild `vulkan.hpp` from the `vk.xml` XML registry file, add the
|
||||||
|
`-DVULKAN_HPP_RUN_GENERATOR=ON` option to the CMake command line.
|
||||||
|
5. Either open the generated project with an IDE, e.g. Visual Studio or launch the build process with ```cmake --build .```.
|
||||||
|
|
||||||
optional) To update the Vulkan-Hpp and its submodules execute ```git pull --recurse-submodules```.
|
Optional: To update the Vulkan-Hpp and its submodules execute ```git pull --recurse-submodules```.
|
||||||
|
|
||||||
### Optional Features
|
### Optional Features
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user