diff --git a/CMakeLists.txt b/CMakeLists.txt index a3d8314..f18f705 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,11 +4,9 @@ project(WinDurango) set(CMAKE_CXX_STANDARD 17) add_subdirectory(projects/WinDurango.Common) -add_subdirectory(projects/WinDurango.Core) add_subdirectory(projects/WinDurango.Kernel) add_custom_target(WinDurango ALL DEPENDS WinDurango.Common - WinDurango.Core WinDurango.Kernel ) diff --git a/projects/WinDurango.Common/CMakeLists.txt b/projects/WinDurango.Common/CMakeLists.txt index 56c8bda..3a1b783 100644 --- a/projects/WinDurango.Common/CMakeLists.txt +++ b/projects/WinDurango.Common/CMakeLists.txt @@ -1,12 +1,14 @@ cmake_minimum_required(VERSION 4.0) project(WinDurango.Common VERSION 1.0.0) -set(VERSION_SUFFIX "-dev.0") # used for non-stable versions, otherwise blank +set(VERSION_SUFFIX "-dev.1") # used for non-stable versions, otherwise blank set(CMAKE_CXX_STANDARD 17) set(FILES - include/WinDurango.Common/Common.h + include/WinDurango.Common/WinDurango.h + src/WinDurango.cpp + include/WinDurango.Common/Config.h ) add_library(WinDurango.Common SHARED ${FILES}) diff --git a/projects/WinDurango.Common/include/WinDurango.Common/Common.h b/projects/WinDurango.Common/include/WinDurango.Common/Common.h deleted file mode 100644 index 4754cb1..0000000 --- a/projects/WinDurango.Common/include/WinDurango.Common/Common.h +++ /dev/null @@ -1,7 +0,0 @@ -// -// Created by DexrnZacAttack on 1/23/26 using zPc-i2. -// -#ifndef WINDURANGO_COMMON_H -#define WINDURANGO_COMMON_H - -#endif // WINDURANGO_COMMON_H \ No newline at end of file diff --git a/projects/WinDurango.Common/include/WinDurango.Common/Config.h b/projects/WinDurango.Common/include/WinDurango.Common/Config.h new file mode 100644 index 0000000..55c3ea8 --- /dev/null +++ b/projects/WinDurango.Common/include/WinDurango.Common/Config.h @@ -0,0 +1,13 @@ +// +// Created by DexrnZacAttack on 1/23/26 using zPc-i2. +// +#ifndef WINDURANGO_CONFIG_H +#define WINDURANGO_CONFIG_H + +namespace wd::common { + class Config { + // todo for later since I don't want to deal with fileio atm + }; +} // wd::common + +#endif // WINDURANGO_CONFIG_H \ No newline at end of file diff --git a/projects/WinDurango.Common/include/WinDurango.Common/WinDurango.h b/projects/WinDurango.Common/include/WinDurango.Common/WinDurango.h new file mode 100644 index 0000000..53b730a --- /dev/null +++ b/projects/WinDurango.Common/include/WinDurango.Common/WinDurango.h @@ -0,0 +1,22 @@ +// +// Created by DexrnZacAttack on 1/23/26 using zPc-i2. +// +#ifndef WINDURANGO_COMMON_H +#define WINDURANGO_COMMON_H + +#include "WinDurango.Common/Config.h" + +namespace wd::common { + class WinDurango { + public: + static WinDurango *GetInstance(); + + WinDurango(); + + Config &GetConfig(); + private: + Config _config; + }; +} + +#endif // WINDURANGO_COMMON_H \ No newline at end of file diff --git a/projects/WinDurango.Common/src/WinDurango.cpp b/projects/WinDurango.Common/src/WinDurango.cpp new file mode 100644 index 0000000..c9bbfb3 --- /dev/null +++ b/projects/WinDurango.Common/src/WinDurango.cpp @@ -0,0 +1,16 @@ +// +// Created by DexrnZacAttack on 1/23/26 using zPc-i2. +// +#include "WinDurango.Common/WinDurango.h" + +namespace wd::common { + WinDurango *WinDurango::GetInstance() { + static WinDurango Instance = WinDurango(); + + return &Instance; + } + + WinDurango::WinDurango() { + this->_config = Config(); + } +} diff --git a/projects/WinDurango.Core/CMakeLists.txt b/projects/WinDurango.Core/CMakeLists.txt deleted file mode 100644 index 82ffd21..0000000 --- a/projects/WinDurango.Core/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -cmake_minimum_required(VERSION 4.0) -project(WinDurango.Core VERSION 1.0.0) - -set(VERSION_SUFFIX "-dev.0") # used for non-stable versions, otherwise blank - -set(CMAKE_CXX_STANDARD 17) - -set(FILES - include/WinDurango.Core/Core.h -) - -add_library(WinDurango.Core SHARED ${FILES}) -target_include_directories(WinDurango.Core PUBLIC - $ -) - -target_link_libraries(WinDurango.Core PUBLIC WinDurango.Common WinDurango.Kernel) - -target_compile_definitions(WinDurango.Core PUBLIC - WINDURANGO_CORE_COMPILER_NAME="${CMAKE_CXX_COMPILER_ID}" - WINDURANGO_CORE_PLATFORM_NAME="${CMAKE_SYSTEM_NAME}" - WINDURANGO_CORE_PLATFORM_ARCH="${CMAKE_SYSTEM_PROCESSOR}" - WINDURANGO_CORE_VERSION="${PROJECT_VERSION}${VERSION_SUFFIX}" - WINDURANGO_CORE_RC_VERSION=${PROJECT_VERSION_MAJOR},${PROJECT_VERSION_MINOR},${PROJECT_VERSION_PATCH} -) - -set_target_properties(WinDurango.Core PROPERTIES LINKER_LANGUAGE CXX) \ No newline at end of file diff --git a/projects/WinDurango.Core/README.md b/projects/WinDurango.Core/README.md deleted file mode 100644 index d05314b..0000000 --- a/projects/WinDurango.Core/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# WinDurango.Core -This shall depend on all projects \ No newline at end of file diff --git a/projects/WinDurango.Core/include/WinDurango.Core/Core.h b/projects/WinDurango.Core/include/WinDurango.Core/Core.h deleted file mode 100644 index 594b575..0000000 --- a/projects/WinDurango.Core/include/WinDurango.Core/Core.h +++ /dev/null @@ -1,7 +0,0 @@ -// -// Created by DexrnZacAttack on 1/23/26 using zPc-i2. -// -#ifndef WINDURANGO_CORE_H -#define WINDURANGO_CORE_H - -#endif // WINDURANGO_CORE_H \ No newline at end of file