Initial Commit
This commit is contained in:
44
CMakeLists.txt
Normal file
44
CMakeLists.txt
Normal file
@@ -0,0 +1,44 @@
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
project(VulkanEngine)
|
||||
|
||||
find_package(Vulkan REQUIRED)
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
glm
|
||||
GIT_REPOSITORY "https://github.com/g-truc/glm.git"
|
||||
GIT_TAG "1.0.1"
|
||||
GIT_SHALLOW ON
|
||||
)
|
||||
FetchContent_MakeAvailable(glm)
|
||||
|
||||
FetchContent_Declare(
|
||||
glfw
|
||||
GIT_REPOSITORY "https://github.com/glfw/glfw.git"
|
||||
GIT_TAG "3.4"
|
||||
GIT_SHALLOW ON
|
||||
)
|
||||
FetchContent_MakeAvailable(glfw)
|
||||
|
||||
FetchContent_Declare(
|
||||
GSL
|
||||
GIT_REPOSITORY "https://github.com/microsoft/GSL.git"
|
||||
GIT_TAG "v4.2.0"
|
||||
GIT_SHALLOW ON
|
||||
)
|
||||
FetchContent_MakeAvailable(GSL)
|
||||
|
||||
file(GLOB_RECURSE VulkanEngineSources CONFIGURE_DEPENDS
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.h"
|
||||
)
|
||||
|
||||
add_executable(VulkanEngine ${VulkanEngineSources})
|
||||
target_link_libraries(VulkanEngine PRIVATE Vulkan::Vulkan)
|
||||
target_link_libraries(VulkanEngine PRIVATE glm)
|
||||
target_link_libraries(VulkanEngine PRIVATE glfw)
|
||||
target_link_libraries(VulkanEngine PRIVATE Microsoft.GSL::GSL)
|
||||
|
||||
target_include_directories(VulkanEngine PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
target_compile_features(VulkanEngine PRIVATE cxx_std_20)
|
||||
Reference in New Issue
Block a user