Initial Commit
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
.vs
|
||||
build/*
|
||||
out
|
||||
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)
|
||||
19
src/main.cpp
Normal file
19
src/main.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <iostream>
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <filesystem>
|
||||
#include <glm/glm.hpp>
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <cstdint>
|
||||
#include <cmath>
|
||||
#include <gsl/gsl>
|
||||
|
||||
int main(std::int32_t argc, gsl::zstring* argv)
|
||||
{
|
||||
gsl::span<gsl::zstring> arguments(argv, argc);
|
||||
std::sort(arguments.begin(), arguments.end());
|
||||
|
||||
gsl::not_null<gsl::zstring*> arguments_pointer_validated = argv;
|
||||
|
||||
std::cout << "Hello, World!" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user