Config
This commit is contained in:
@@ -37,7 +37,9 @@ project(DREAM2026
|
|||||||
# Target: DREAM2026
|
# Target: DREAM2026
|
||||||
set(DREAM2026_SOURCES
|
set(DREAM2026_SOURCES
|
||||||
cmake.toml
|
cmake.toml
|
||||||
|
"src/Engine/Config/Config.cpp"
|
||||||
"src/Engine/Engine.cpp"
|
"src/Engine/Engine.cpp"
|
||||||
|
"src/Engine/Utils/Filesystem.cpp"
|
||||||
"src/Engine/Window/Window.cpp"
|
"src/Engine/Window/Window.cpp"
|
||||||
"src/Game/src/Game.cpp"
|
"src/Game/src/Game.cpp"
|
||||||
"src/main.cpp"
|
"src/main.cpp"
|
||||||
@@ -67,6 +69,8 @@ set_target_properties(DREAM2026 PROPERTIES
|
|||||||
20
|
20
|
||||||
CXX_STANDARD_REQUIRED
|
CXX_STANDARD_REQUIRED
|
||||||
ON
|
ON
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY
|
||||||
|
GAME_BUILD
|
||||||
)
|
)
|
||||||
|
|
||||||
get_directory_property(CMKR_VS_STARTUP_PROJECT DIRECTORY ${PROJECT_SOURCE_DIR} DEFINITION VS_STARTUP_PROJECT)
|
get_directory_property(CMKR_VS_STARTUP_PROJECT DIRECTORY ${PROJECT_SOURCE_DIR} DEFINITION VS_STARTUP_PROJECT)
|
||||||
|
|||||||
@@ -13,5 +13,7 @@ compile-features = ["cxx_std_20"]
|
|||||||
link-libraries = ["raylib", "fmt"]
|
link-libraries = ["raylib", "fmt"]
|
||||||
|
|
||||||
[target.DREAM2026.properties]
|
[target.DREAM2026.properties]
|
||||||
|
# properties RUNTIME_OUTPUT_DIRECTORY
|
||||||
CXX_STANDARD = 20
|
CXX_STANDARD = 20
|
||||||
CXX_STANDARD_REQUIRED = true
|
CXX_STANDARD_REQUIRED = true
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY = "GAME_BUILD"
|
||||||
|
|||||||
0
src/Engine/Config/Config.cpp
Normal file
0
src/Engine/Config/Config.cpp
Normal file
0
src/Engine/Config/Config.hpp
Normal file
0
src/Engine/Config/Config.hpp
Normal file
17
src/Engine/Utils/Filesystem.cpp
Normal file
17
src/Engine/Utils/Filesystem.cpp
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
src/Engine/Utils/Filesystem.hpp
Normal file
11
src/Engine/Utils/Filesystem.hpp
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user