diff --git a/CMakeLists.txt b/CMakeLists.txt index 86ab1fa..d964263 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,6 @@ if (ASSIMP_FOUND) include_directories(${ASSIMP_INCLUDE_DIR}) endif () -set(FILESYSTEM_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/libs/filesystem/include) set(GLM_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/libs/glm/include) set(GLAD_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/libs/glad/include) set(STB_IMAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/libs/image/include) @@ -41,9 +40,6 @@ set(GLAD set(STB_IMAGE ${CMAKE_CURRENT_SOURCE_DIR}/libs/image/src/stb_image.cpp ${CMAKE_CURRENT_SOURCE_DIR}/libs/image/include/image/stb_image.h) -set(FILESYSTEM - ${CMAKE_CURRENT_SOURCE_DIR}/libs/filesystem/src/filesystem.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/libs/filesystem/include/filesystem/filesystem.h) file(GLOB_RECURSE IMGUI "libs/imgui/*") @@ -53,7 +49,6 @@ set(COMPILATION_UNIT src/main.cpp ${GLAD} ${STB_IMAGE} - ${FILESYSTEM} ${IMGUI} ${SOURCES} ) @@ -62,7 +57,6 @@ add_executable(${PROJECT_NAME} ${COMPILATION_UNIT}) target_include_directories(${PROJECT_NAME} PUBLIC ${GLAD_INCLUDE_DIRS} - ${FILESYSTEM_INCLUDE_DIRS} ${GLM_INCLUDE_DIRS} ${STB_IMAGE_INCLUDE_DIRS} ${KHR_INCLUDE_DIRS} diff --git a/libs/filesystem/include/filesystem/filesystem.h b/libs/filesystem/include/filesystem/filesystem.h deleted file mode 100644 index 2177838..0000000 --- a/libs/filesystem/include/filesystem/filesystem.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include - -namespace fs { - -std::string path(const std::string& p); -} diff --git a/libs/filesystem/src/filesystem.cpp b/src/utils/filesystem.hpp similarity index 55% rename from libs/filesystem/src/filesystem.cpp rename to src/utils/filesystem.hpp index f2698a1..9983a0c 100644 --- a/libs/filesystem/src/filesystem.cpp +++ b/src/utils/filesystem.hpp @@ -1,7 +1,12 @@ -#include "filesystem/filesystem.h" +#pragma once + #include +#include + +namespace fs { -std::string fs::path(const std::string& p) { +inline std::string path(const std::string& p) { auto cwd = std::filesystem::current_path().parent_path(); return cwd.append(p).string(); } +} diff --git a/src/utils/key.hpp b/src/utils/key.hpp index 58613fc..2202a91 100644 --- a/src/utils/key.hpp +++ b/src/utils/key.hpp @@ -4,6 +4,7 @@ #include "glm/glm.hpp" namespace key { + std::string createFromPosition(const glm::vec3 pos) { return std::string(std::to_string(pos.x) + (char)pos.y + (char)pos.z); } diff --git a/src/world/skybox.h b/src/world/skybox.h index b202d2b..f441519 100644 --- a/src/world/skybox.h +++ b/src/world/skybox.h @@ -4,9 +4,9 @@ #include #include #include "glm/glm.hpp" -#include "filesystem/filesystem.h" #include "mesh/texture.h" #include "../configs/configs.hpp" +#include "../utils/filesystem.hpp" class Shader; class SkyboxMesh; diff --git a/src/world/world.h b/src/world/world.h index 586e136..dff1c5e 100644 --- a/src/world/world.h +++ b/src/world/world.h @@ -5,7 +5,7 @@ #include #include "glm/glm.hpp" #include "mesh/texture.h" -#include "filesystem/filesystem.h" +#include "../utils/filesystem.hpp" #include "../configs/configs.hpp" class Cell;