diff --git a/CMakeLists.txt b/CMakeLists.txt index 3586394..f173eb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,7 +87,7 @@ add_executable(vulkanologi add_compile_definitions(VULKAN_HPP_NO_STRUCT_CONSTRUCTORS) # Version 145 at least target_precompile_headers(vulkanologi PRIVATE ${Vulkan_INCLUDE_DIRS}/vulkan/vulkan.hpp ext/glm/glm/glm.hpp) -target_precompile_headers(vulkanologi PRIVATE src/BehDevice.h) +target_precompile_headers(vulkanologi PRIVATE src/BehDevice.h src/WindowWrapper.h) target_link_libraries(vulkanologi glfw glm tinyobjloader VulkanMemoryAllocator Vulkan::Vulkan) add_shader(vulkanologi shader.frag) diff --git a/src/BehDevice.h b/src/BehDevice.h index 0ebe3cf..048f48f 100644 --- a/src/BehDevice.h +++ b/src/BehDevice.h @@ -1,13 +1,17 @@ -#pragma once +#ifndef BEHDEVICE_H +#define BEHDEVICE_H +#pragma once #include "WindowWrapper.h" +#include "BehVkTypes.h" +#include "Deletionqueue.h" #include #include #include #include #include -#include "BehVkTypes.h" -#include "Deletionqueue.h" +#include + #ifdef NDEBUG const bool enableValidationLayers = false; @@ -117,3 +121,5 @@ class BehDevice { const std::vector deviceExtensions = { VK_KHR_SWAPCHAIN_EXTENSION_NAME}; }; + +#endif \ No newline at end of file diff --git a/src/WindowWrapper.h b/src/WindowWrapper.h index 2c06eb0..d935c48 100644 --- a/src/WindowWrapper.h +++ b/src/WindowWrapper.h @@ -1,4 +1,7 @@ -#pragma once +#ifndef WINDOWWRAPPER_H +#define WINDOWWRAPPER_H +#pragma once + #include #define GLFW_INCLUDE_VULKAN @@ -22,3 +25,5 @@ class WindowWrapper { [[nodiscard]] bool isFullScreen(); void setTitle(const char* title); }; + +#endif \ No newline at end of file