Initial commit
This commit is contained in:
40
CMakeLists.txt
Normal file
40
CMakeLists.txt
Normal file
@@ -0,0 +1,40 @@
|
||||
# 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
|
||||
)
|
||||
|
||||
# Links the libraries to the binary #
|
||||
target_link_libraries(VulkanRenderer PRIVATE
|
||||
Vulkan::Vulkan
|
||||
glfw
|
||||
)
|
||||
Reference in New Issue
Block a user