mirror of
https://github.com/WinDurango/WinDurango.git
synced 2026-01-31 00:55:17 +01:00
feat: start on main class
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
@@ -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})
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
16
projects/WinDurango.Common/src/WinDurango.cpp
Normal file
16
projects/WinDurango.Common/src/WinDurango.cpp
Normal 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();
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
@@ -1,2 +0,0 @@
|
||||
# WinDurango.Core
|
||||
This shall depend on all projects
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user