Files
VulkanRenderer/CMakeLists.txt
2025-11-15 17:27:08 +00:00

43 lines
925 B
CMake

# Sets minimum CMake and C++ Standard version #
cmake_minimum_required (VERSION 4.0)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
project(VulkanRendererProject)
include(FetchContent)
# Adds Vulkan to the project #
FetchContent_Declare(
VulkanHeaders
GIT_REPOSITORY https://github.com/KhronosGroup/Vulkan-Headers.git
GIT_TAG v1.3.296
)
FetchContent_MakeAvailable(VulkanHeaders)
find_package(Vulkan REQUIRED)
# Adds GLFW for window creation #
FetchContent_Declare(
glfw
GIT_REPOSITORY https://github.com/glfw/glfw.git
GIT_TAG 3.4
)
FetchContent_MakeAvailable(glfw)
# Creates the output binary
project(VulkanRenderer LANGUAGES CXX)
add_executable(VulkanRenderer
main.cpp
src/GLFWManager.h
src/GLFWManager.cpp
)
# Links the libraries to the binary #
target_link_libraries(VulkanRenderer PRIVATE
Vulkan::Vulkan
glfw
)