sample C++ 17 project with Vulkan, CMake, GLM and GLFW
git clone --recursive https://github.com/Luvideria/VulkanCMakeStarter.git
if you cloned too fast without the recursive:
git submodule update --init --recursive
build with:
mkdir build && cd build
cmake -G"Unix Makefiles" ..
make -j
/!!\ You still need to download the Vulkan SDK and install it so that the FindVulkan finds it
https://vulkan.lunarg.com/sdk/home
There are 5 targets:
- GLMTest: build linking with glm alone. Prints result of glm computation.
- GLFWTest: opens a window
- VulkanTest: prints the list of vulkan extensions
- GLFWVulkanTest: Checks that GLFW can bind with Vulkan with example from https://vulkan-tutorial.com/en/Drawing_a_triangle/Setup/Base_code
- A blank main with everything linked together, for you to use.
Remove everything in src/ except for main.cpp. Delete the end of the CMakeLists.txt, it is indicated where.