feat: start on main class

This commit is contained in:
Dexrn ZacAttack
2026-01-23 18:08:41 -08:00
parent a82a218c3c
commit 052e4e200b
9 changed files with 55 additions and 47 deletions

View File

@@ -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
)

View File

@@ -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})

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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();
}
}

View File

@@ -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
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)
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)

View File

@@ -1,2 +0,0 @@
# WinDurango.Core
This shall depend on all projects

View File

@@ -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