This commit is contained in:
2026-02-15 21:44:33 +01:00
parent 2489e5795b
commit 3971801b22
6 changed files with 34 additions and 0 deletions

View File

@@ -37,7 +37,9 @@ project(DREAM2026
# Target: DREAM2026
set(DREAM2026_SOURCES
cmake.toml
"src/Engine/Config/Config.cpp"
"src/Engine/Engine.cpp"
"src/Engine/Utils/Filesystem.cpp"
"src/Engine/Window/Window.cpp"
"src/Game/src/Game.cpp"
"src/main.cpp"
@@ -67,6 +69,8 @@ set_target_properties(DREAM2026 PROPERTIES
20
CXX_STANDARD_REQUIRED
ON
RUNTIME_OUTPUT_DIRECTORY
GAME_BUILD
)
get_directory_property(CMKR_VS_STARTUP_PROJECT DIRECTORY ${PROJECT_SOURCE_DIR} DEFINITION VS_STARTUP_PROJECT)

View File

@@ -13,5 +13,7 @@ compile-features = ["cxx_std_20"]
link-libraries = ["raylib", "fmt"]
[target.DREAM2026.properties]
# properties RUNTIME_OUTPUT_DIRECTORY
CXX_STANDARD = 20
CXX_STANDARD_REQUIRED = true
RUNTIME_OUTPUT_DIRECTORY = "GAME_BUILD"

View File

View File

View File

@@ -0,0 +1,17 @@
#include "Filesystem.hpp"
#include <filesystem>
#include <system_error>
namespace DREAM {
namespace Filesystem {
bool DREAM::Filesystem::fileExists(std::string_view path) {
std::error_code ec;
return std::filesystem::is_regular_file(path, ec);
}
bool DREAM::Filesystem::directoryExists(std::string_view path) {
std::error_code ec;
return std::filesystem::is_directory(path, ec);
}
}
}

View File

@@ -0,0 +1,11 @@
#pragma once
#include <string>
#include <filesystem>
namespace DREAM {
namespace Filesystem {
bool fileExists(std::string_view path);
bool directoryExists(std::string_view path);
}
}