A basic CMake setup for Vulkan development ☆彡
See Victor Blanco's Vulkan Guide for a list of libraries.
Most dependencies are included as submodules, so please clone this repo with:
git clone --recurse-submodules https://github.com/jakobbbb/hello-vulkan
or run git submodule init && git submodule update
after cloning.
Most external libraries are included as git submodules. Install glfw3, Vulkan itself and the necessary tools using your distro's package manager, e.g.:
Ubuntu:
apt install build-essential \
cmake \
glslang-dev \
glslang-tools \
libglfw3-dev \
libvulkan-dev \
spirv-tools \
vulkan-validationlayers-dev
Arch:
pacman -S \
base-devel \
cmake \
glfw \
glslang \
vulkan-headers \
vulkan-validation-layers
For convenience, a top-level Makefile
is provided.
To build the entire project, simply run:
make
Binaries will be in ./build/source
.
Execute make run
to run the main binary.
The following other Makefile targets may be of use:
build
(default)debug
: Create a debug build.test
: Compile and run tests.lint
: Check code formatting withclang-format
.codeformat
: Auto-format code withclang-format
.clean
: Remove build files.