TMP / Removed boost dependency

This commit is contained in:
OLEGSHA 2023-03-11 20:43:28 +01:00
parent 7e39188f80
commit 2e61b990f7
8 changed files with 22 additions and 17 deletions

View File

@ -131,7 +131,3 @@ target_link_libraries(progressia glm::glm)
# Use STB # Use STB
target_include_directories(progressia PUBLIC target_include_directories(progressia PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/lib/stb/include) ${CMAKE_CURRENT_SOURCE_DIR}/lib/stb/include)
# Use Boost
find_package(Boost 1.74 REQUIRED)
target_link_libraries(progressia Boost::headers)

View File

@ -1,6 +1,5 @@
#pragma once #pragma once
#include "boost/core/noncopyable.hpp"
#include "vulkan_common.h" #include "vulkan_common.h"
#include "vulkan_descriptor_set.h" #include "vulkan_descriptor_set.h"
#include "vulkan_image.h" #include "vulkan_image.h"

View File

@ -1,6 +1,5 @@
#pragma once #pragma once
#include <boost/core/noncopyable.hpp>
#include <vector> #include <vector>
#include "vulkan_common.h" #include "vulkan_common.h"

View File

@ -17,7 +17,7 @@
#include <glm/vec3.hpp> #include <glm/vec3.hpp>
#include <glm/vec4.hpp> #include <glm/vec4.hpp>
#include <boost/core/noncopyable.hpp> #include "../../main/util.h"
#include "../../main/logging.h" #include "../../main/logging.h"
#include "../../main/rendering/graphics_interface.h" #include "../../main/rendering/graphics_interface.h"
@ -54,7 +54,7 @@ struct CstrCompare {
using CstrHashSet = std::unordered_set<const char *, CstrHash, CstrEqual>; using CstrHashSet = std::unordered_set<const char *, CstrHash, CstrEqual>;
} // namespace CstrUtils } // namespace CstrUtils
class VkObjectWrapper : private boost::noncopyable { class VkObjectWrapper : private progressia::main::NonCopyable {
// empty // empty
}; };

View File

@ -1,6 +1,5 @@
#pragma once #pragma once
#include <boost/core/noncopyable.hpp>
#include <vector> #include <vector>
#include "vulkan_buffer.h" #include "vulkan_buffer.h"

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "boost/core/noncopyable.hpp" #include "util.h"
#include <ostream> #include <ostream>
namespace progressia { namespace progressia {
@ -8,7 +8,7 @@ namespace main {
namespace detail { namespace detail {
class LogSink : private boost::noncopyable { class LogSink : private progressia::main::NonCopyable {
private: private:
bool isCurrentSink; bool isCurrentSink;

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "boost/core/noncopyable.hpp" #include "../util.h"
#include <vector> #include <vector>
#define GLM_FORCE_RADIANS #define GLM_FORCE_RADIANS
@ -25,7 +25,7 @@ struct Vertex {
glm::vec2 texCoord; glm::vec2 texCoord;
}; };
class Texture : private boost::noncopyable { class Texture : private progressia::main::NonCopyable {
public: public:
using Backend = void *; using Backend = void *;
@ -39,7 +39,7 @@ class Texture : private boost::noncopyable {
~Texture(); ~Texture();
}; };
class Primitive : private boost::noncopyable { class Primitive : private progressia::main::NonCopyable {
public: public:
using Backend = void *; using Backend = void *;
@ -57,7 +57,7 @@ class Primitive : private boost::noncopyable {
const Texture *getTexture() const; const Texture *getTexture() const;
}; };
class View : private boost::noncopyable { class View : private progressia::main::NonCopyable {
public: public:
using Backend = void *; using Backend = void *;
@ -72,7 +72,7 @@ class View : private boost::noncopyable {
void use(); void use();
}; };
class Light : private boost::noncopyable { class Light : private progressia::main::NonCopyable {
public: public:
using Backend = void *; using Backend = void *;
@ -88,7 +88,7 @@ class Light : private boost::noncopyable {
void use(); void use();
}; };
class GraphicsInterface : private boost::noncopyable { class GraphicsInterface : private progressia::main::NonCopyable {
public: public:
using Backend = void *; using Backend = void *;

View File

@ -28,3 +28,15 @@
}; \ }; \
} }
// clang-format on // clang-format on
namespace progressia {
namespace main {
struct NonCopyable {
NonCopyable &operator=(const NonCopyable &) = delete;
NonCopyable(const NonCopyable &) = delete;
NonCopyable() = default;
};
} // namespace main
} // namespace progressia