Initial commit for App

This commit is contained in:
Eero Holmala 2023-03-27 17:36:11 +03:00
parent 445f2ccac3
commit c391b7cfa5
11 changed files with 167 additions and 0 deletions

1
App/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

47
App/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,47 @@
{
"files.associations": {
"algorithm": "cpp",
"atomic": "cpp",
"bit": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"compare": "cpp",
"concepts": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"exception": "cpp",
"initializer_list": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"iterator": "cpp",
"limits": "cpp",
"memory": "cpp",
"new": "cpp",
"ostream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"utility": "cpp",
"xfacet": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocinfo": "cpp",
"xlocnum": "cpp",
"xmemory": "cpp",
"xstddef": "cpp",
"xstring": "cpp",
"xtr1common": "cpp",
"xutility": "cpp"
}
}

22
App/App/CMakeLists.txt Normal file
View File

@ -0,0 +1,22 @@
cmake_minimum_required (VERSION 3.8)
# Add source to this project's executable.
file(GLOB SRCS "src/*.cpp")
file(GLOB_RECURSE HDRS "include/*.hh")
add_executable(App
${SRCS}
${HDRS}
)
target_link_libraries(App PUBLIC AppLib)
target_include_directories(App PUBLIC "${CMAKE_SOURCE_DIR}/App/include")
target_include_directories(App PUBLIC "${CMAKE_SOURCE_DIR}/AppLib/include/AppLib")
if (CMAKE_VERSION VERSION_GREATER 3.12)
set_property(TARGET App PROPERTY CXX_STANDARD 20)
endif()

15
App/App/include/App.hh Normal file
View File

@ -0,0 +1,15 @@
#include "Logger.hh"
using namespace Core;
namespace App
{
class App
{
private:
Logger* _logger;
public:
App(/* args */);
~App();
};
} // namespace App

16
App/App/src/App.cpp Normal file
View File

@ -0,0 +1,16 @@
#include <iostream>
#include "App.hh"
namespace App
{
App::App()
{
std::cout << "This is app" << std::endl;
}
App::~App()
{
}
} // namespace App

7
App/App/src/main.cpp Normal file
View File

@ -0,0 +1,7 @@
#include "App.hh"
int main(int argc, char const *argv[])
{
App::App* app = new App::App();
return 0;
}

18
App/AppLib/CMakeLists.txt Normal file
View File

@ -0,0 +1,18 @@
cmake_minimum_required (VERSION 3.8)
# Add source to this project's executable.
file(GLOB SRCS "src/*.cpp")
file(GLOB_RECURSE HDRS "include/*.hh")
add_library(AppLib
${SRCS}
${HDRS}
)
target_include_directories(AppLib PUBLIC "${CMAKE_SOURCE_DIR}/AppLib/include/AppLib")
if (CMAKE_VERSION VERSION_GREATER 3.12)
set_property(TARGET AppLib PROPERTY CXX_STANDARD 20)
endif()

View File

@ -0,0 +1,11 @@
namespace Core
{
class Logger
{
private:
/* data */
public:
Logger();
~Logger();
};
} // namespace Core

13
App/AppLib/src/Logger.cpp Normal file
View File

@ -0,0 +1,13 @@
#include "Logger.hh"
namespace Core
{
Logger::Logger(/* args */)
{
}
Logger::~Logger()
{
}
} // namespace Core

9
App/AppLib/src/Utils.cpp Normal file
View File

@ -0,0 +1,9 @@
#include <iostream>
namespace Core
{
const void getVersion()
{
std::cout << "Version: 0.1" << std::endl;
}
} // namespace Core

8
App/CMakeLists.txt Normal file
View File

@ -0,0 +1,8 @@
cmake_minimum_required (VERSION 3.8)
project ("App")
enable_testing()
add_subdirectory(App)
add_subdirectory(AppLib)