asseco_vagrant/0001-inicjalizacja-cmake-na-linuxie.patch
Bartosz Wieczorek 3c155608c3 init:
2024-06-10 15:53:59 +02:00

564 lines
25 KiB
Diff

From ff02d527990c22bce609dfc4af08dc4d67a7c4e4 Mon Sep 17 00:00:00 2001
From: Bartosz Wieczorek <bartosz.wieczorek.2@asseco.pl>
Date: Fri, 3 Nov 2023 13:08:30 +0100
Subject: [PATCH] inicjalizacja cmake na linuxie
---
COMMON/CMakeLists.txt | 7 +
COMMON/CMakeLists.txt.user | 258 +++++++++++++++++++++++++++++++++
COMMON/Common/CMakeLists.txt | 36 +++++
COMMON/Common/E2GDebug.cpp | 1 +
COMMON/Common/E2GDebug.h | 5 +-
COMMON/Common/E2GDecimal.cpp | 14 +-
COMMON/Common/E2GTemplates.cpp | 13 +-
COMMON/Common/E2GWyjatek.cpp | 1 +
COMMON/Podstawa/CMakeLists.txt | 37 +++++
COMMON/Staze/CMakeLists.txt | 37 +++++
COMMON/Staze/E2GDaty.cpp | 1 +
COMMON/Staze/E2GOkresy.cpp | 1 +
COMMON/Staze/E2GSSlOkresow.cpp | 1 +
13 files changed, 399 insertions(+), 13 deletions(-)
create mode 100644 COMMON/CMakeLists.txt
create mode 100644 COMMON/CMakeLists.txt.user
create mode 100644 COMMON/Common/CMakeLists.txt
create mode 100644 COMMON/Podstawa/CMakeLists.txt
create mode 100644 COMMON/Staze/CMakeLists.txt
diff --git a/COMMON/CMakeLists.txt b/COMMON/CMakeLists.txt
new file mode 100644
index 0000000..81aa77c
--- /dev/null
+++ b/COMMON/CMakeLists.txt
@@ -0,0 +1,7 @@
+cmake_minimum_required(VERSION 3.19)
+
+project(e2alg LANGUAGES C CXX)
+
+add_subdirectory(Common)
+add_subdirectory(Staze)
+add_subdirectory(Podstawa)
diff --git a/COMMON/CMakeLists.txt.user b/COMMON/CMakeLists.txt.user
new file mode 100644
index 0000000..c3a3d09
--- /dev/null
+++ b/COMMON/CMakeLists.txt.user
@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE QtCreatorProject>
+<!-- Written by QtCreator 12.0.2, 2024-05-23T09:26:59. -->
+<qtcreator>
+ <data>
+ <variable>EnvironmentId</variable>
+ <value type="QByteArray">{a43cdd5b-7966-46da-935c-9a6c3d6cfb16}</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.ActiveTarget</variable>
+ <value type="qlonglong">0</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.EditorSettings</variable>
+ <valuemap type="QVariantMap">
+ <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
+ <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
+ <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
+ <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
+ <value type="QString" key="language">Cpp</value>
+ <valuemap type="QVariantMap" key="value">
+ <value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
+ </valuemap>
+ </valuemap>
+ <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
+ <value type="QString" key="language">QmlJS</value>
+ <valuemap type="QVariantMap" key="value">
+ <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
+ </valuemap>
+ </valuemap>
+ <value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
+ <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
+ <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
+ <value type="int" key="EditorConfiguration.IndentSize">4</value>
+ <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
+ <value type="int" key="EditorConfiguration.MarginColumn">80</value>
+ <value type="bool" key="EditorConfiguration.MouseHiding">true</value>
+ <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
+ <value type="int" key="EditorConfiguration.PaddingMode">1</value>
+ <value type="int" key="EditorConfiguration.PreferAfterWhitespaceComments">0</value>
+ <value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
+ <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
+ <value type="bool" key="EditorConfiguration.ShowMargin">false</value>
+ <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
+ <value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
+ <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
+ <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
+ <value type="int" key="EditorConfiguration.TabSize">8</value>
+ <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
+ <value type="bool" key="EditorConfiguration.UseIndenter">false</value>
+ <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
+ <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
+ <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
+ <value type="bool" key="EditorConfiguration.cleanWhitespace">false</value>
+ <value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md,*.MD,Makefile</value>
+ <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
+ <value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
+ <value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.PluginSettings</variable>
+ <valuemap type="QVariantMap">
+ <valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
+ <value type="bool" key="AutoTest.Framework.Boost">true</value>
+ <value type="bool" key="AutoTest.Framework.CTest">false</value>
+ <value type="bool" key="AutoTest.Framework.Catch">true</value>
+ <value type="bool" key="AutoTest.Framework.GTest">true</value>
+ <value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
+ <value type="bool" key="AutoTest.Framework.QtTest">true</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
+ <value type="int" key="AutoTest.RunAfterBuild">0</value>
+ <value type="bool" key="AutoTest.UseGlobal">true</value>
+ <value type="QString" key="Axivion.ProjectName"></value>
+ <valuemap type="QVariantMap" key="ClangTools">
+ <value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
+ <value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
+ <value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
+ <value type="int" key="ClangTools.ParallelJobs">8</value>
+ <value type="bool" key="ClangTools.PreferConfigFile">true</value>
+ <valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
+ <valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
+ <valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
+ <value type="bool" key="ClangTools.UseGlobalSettings">true</value>
+ </valuemap>
+ <value type="QDateTime" key="GitLab.LastRequest"></value>
+ <value type="QString" key="GitLab.LinkedId"></value>
+ <value type="QString" key="GitLab.Project"></value>
+ <value type="QString" key="GitLab.Server"></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Target.0</variable>
+ <valuemap type="QVariantMap">
+ <value type="QString" key="DeviceType">Desktop</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">GCC 12</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">GCC 12</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{e1ef4662-de51-4c91-b1d1-e4a1355650a2}</value>
+ <value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
+ <value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
+ <value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
+ <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
+ <value type="QString" key="CMake.Build.Type">Debug</value>
+ <value type="int" key="CMake.Configure.BaseEnvironment">2</value>
+ <value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
+ <valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
+ <value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
+-DCMAKE_BUILD_TYPE:STRING=Debug
+-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
+-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
+-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
+-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
+-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
+-DCMAKE_CXX_COMPILER_LAUNCHER:UNINITIALIZED=&quot;distcc&quot;
+-DCMAKE_C_COMPILER_LAUNCHER:UNINITIALIZED=&quot;distcc&quot;</value>
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/bartoszek/builds/build-E2ALG-GCC_12-Debug</value>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+ <value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
+ <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+ <value type="QString">all</value>
+ </valuelist>
+ <value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
+ <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Zbuduj</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+ </valuemap>
+ <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Budowanie</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Budowanie</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+ <value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
+ <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
+ <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Zbuduj</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+ </valuemap>
+ <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Wyczyść</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Wyczyść</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+ </valuemap>
+ <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+ <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+ <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+ <value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
+ <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
+ <value type="QString" key="CMake.Build.Type">Release</value>
+ <value type="int" key="CMake.Configure.BaseEnvironment">2</value>
+ <value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
+ <valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
+ <value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
+-DCMAKE_BUILD_TYPE:STRING=Release
+-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
+-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
+-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
+-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
+-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
+ <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/bartoszek/builds/build-E2ALG-GCC_12-Release</value>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+ <value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
+ <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+ <value type="QString">all</value>
+ </valuelist>
+ <value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
+ <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+ </valuemap>
+ <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Budowanie</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Budowanie</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
+ </valuemap>
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
+ <value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
+ <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
+ <value type="QString">clean</value>
+ </valuelist>
+ <value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
+ <valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
+ <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
+ </valuemap>
+ <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Wyczyść</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Wyczyść</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
+ </valuemap>
+ <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
+ <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
+ <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
+ <value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
+ <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
+ </valuemap>
+ <value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
+ <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
+ <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
+ <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Zainstaluj</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Zainstaluj</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
+ </valuemap>
+ <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
+ <valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
+ <value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
+ </valuemap>
+ <value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
+ <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
+ <value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
+ <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
+ <value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
+ <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
+ <valuelist type="QVariantList" key="CustomOutputParsers"/>
+ <value type="int" key="PE.EnvironmentAspect.Base">2</value>
+ <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
+ <value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
+ <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
+ <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
+ <value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
+ <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+ <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+ </valuemap>
+ <value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.TargetCount</variable>
+ <value type="qlonglong">1</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+ <value type="int">22</value>
+ </data>
+ <data>
+ <variable>Version</variable>
+ <value type="int">22</value>
+ </data>
+</qtcreator>
diff --git a/COMMON/Common/CMakeLists.txt b/COMMON/Common/CMakeLists.txt
new file mode 100644
index 0000000..cc8d29a
--- /dev/null
+++ b/COMMON/Common/CMakeLists.txt
@@ -0,0 +1,36 @@
+set(LIB E2ALGCommon)
+
+file(GLOB LIB_INC *.h)
+file(GLOB LIB_SRC *.cpp)
+add_library(${LIB}_ifc INTERFACE)
+add_library(E2ALG::Common_ifc ALIAS ${LIB}_ifc)
+
+target_include_directories(${LIB}_ifc
+ PUBLIC INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+)
+
+add_library(${LIB} SHARED ${LIB_SRC} ${LIB_INC_PUB} ${LIB_INC})
+add_library(E2ALG::Common ALIAS ${LIB})
+
+target_link_libraries(${LIB}
+ PRIVATE
+ PUBLIC
+ E2ALG::Common_ifc
+)
+
+install(
+ TARGETS
+ ${LIB}
+ DESTINATION
+ lib
+)
+
+install(
+ FILES
+ ${LIB_INC}
+ DESTINATION
+ include
+)
+
+
diff --git a/COMMON/Common/E2GDebug.cpp b/COMMON/Common/E2GDebug.cpp
index 2cdec52..18d9237 100644
--- a/COMMON/Common/E2GDebug.cpp
+++ b/COMMON/Common/E2GDebug.cpp
@@ -1,4 +1,5 @@
//---------------------------------------------------------------------------
+#include <cstring>
#include <ctime> // JK bylo .h bez c z przodu
#include "E2GDebug.h"
static char bufDataCzas[100];
diff --git a/COMMON/Common/E2GDebug.h b/COMMON/Common/E2GDebug.h
index 57751f6..fc76441 100644
--- a/COMMON/Common/E2GDebug.h
+++ b/COMMON/Common/E2GDebug.h
@@ -8,7 +8,11 @@
#include <functional>
#include <utility>
#include <string>
-#ifndef __SOSMVS__
+
+#ifdef __linux__
+#include <fstream>
+using namespace std;
+#elif defined __SOSMVS__
#include <stdarg.h>
#include <fstream.h>
#else
diff --git a/COMMON/Common/E2GDecimal.cpp b/COMMON/Common/E2GDecimal.cpp
index 4ae0119..ed51a0b 100644
--- a/COMMON/Common/E2GDecimal.cpp
+++ b/COMMON/Common/E2GDecimal.cpp
@@ -1,15 +1,17 @@
//---------------------------------------------------------------------------
-#ifndef __SOSMVS__
- #include <strstream.h>
-#else
+#include <cstring>
+#ifdef __linux__
#include <strstream>
-#endif
-#include <algorithm>
-#ifndef __SOSMVS__
+ #include <cstdlib>
+ #include <algorithm>
+#elif not defined(__SOSMVS__)
+ #include <strstream.h>
#include <stdlib.h>
#else
+ #include <strstream>
#include <cstdlib>
+ #include <algorithm>
#endif
#include <math.h>
#include "E2GDecimal.h"
diff --git a/COMMON/Common/E2GTemplates.cpp b/COMMON/Common/E2GTemplates.cpp
index 01ae166..0acc757 100644
--- a/COMMON/Common/E2GTemplates.cpp
+++ b/COMMON/Common/E2GTemplates.cpp
@@ -1,15 +1,16 @@
//---------------------------------------------------------------------------
-#ifndef __SOSMVS__
- #include <fstream.h>
-#else
+#include <cstring>
+#ifdef __linux__
#include <fstream>
-#endif
-#include <string>
-#ifndef __SOSMVS__
+#elif not defined (__SOSMVS__)
+ #include <fstream.h>
#include <errno.h>
#else
+ #include <fstream>
#include <cerrno>
#endif
+#include <string>
+
#include "E2GTemplates.h"
#include "E2GCommon.h"
#include "E2GWyjatek.h"
diff --git a/COMMON/Common/E2GWyjatek.cpp b/COMMON/Common/E2GWyjatek.cpp
index 7bf02c3..4e4ac02 100644
--- a/COMMON/Common/E2GWyjatek.cpp
+++ b/COMMON/Common/E2GWyjatek.cpp
@@ -1,6 +1,7 @@
//---------------------------------------------------------------------------
#include <cstdio> // JK bylo z .h bez c
#include <cstdarg> // JK bylo z .h bez c
+#include <cstring>
#include "E2GWyjatek.h"
#include "E2GDebug.h"
#include "E2GBledy.h"
diff --git a/COMMON/Podstawa/CMakeLists.txt b/COMMON/Podstawa/CMakeLists.txt
new file mode 100644
index 0000000..d9a2a0a
--- /dev/null
+++ b/COMMON/Podstawa/CMakeLists.txt
@@ -0,0 +1,37 @@
+set(LIB E2ALGPodstawa)
+
+file(GLOB LIB_INC *.h)
+file(GLOB LIB_SRC *.cpp)
+add_library(${LIB}_ifc INTERFACE)
+add_library(E2ALG::Podstawa_ifc ALIAS ${LIB}_ifc)
+
+target_include_directories(${LIB}_ifc
+ PUBLIC INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+)
+
+add_library(${LIB} SHARED ${LIB_SRC} ${LIB_INC_PUB} ${LIB_INC})
+add_library(E2::Podstawa ALIAS ${LIB})
+
+target_link_libraries(${LIB}
+ PRIVATE
+ E2ALG::Common_ifc
+ PUBLIC
+ E2ALG::Podstawa_ifc
+)
+
+
+install(
+ TARGETS
+ ${LIB}
+ DESTINATION
+ lib
+)
+
+install(
+ FILES
+ ${LIB_INC}
+ DESTINATION
+ include
+)
+
diff --git a/COMMON/Staze/CMakeLists.txt b/COMMON/Staze/CMakeLists.txt
new file mode 100644
index 0000000..cf989d3
--- /dev/null
+++ b/COMMON/Staze/CMakeLists.txt
@@ -0,0 +1,37 @@
+set(LIB E2ALGStaze)
+
+file(GLOB LIB_INC *.h)
+file(GLOB LIB_SRC *.cpp)
+add_library(${LIB}_ifc INTERFACE)
+add_library(E2ALG::Staze_ifc ALIAS ${LIB}_ifc)
+
+target_include_directories(${LIB}_ifc
+ PUBLIC INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+)
+
+add_library(${LIB} SHARED ${LIB_SRC} ${LIB_INC_PUB} ${LIB_INC})
+add_library(E2ALG::Staze ALIAS ${LIB})
+
+target_link_libraries(${LIB}
+ PRIVATE
+ E2ALG::Common_ifc
+ PUBLIC
+ E2ALG::Staze_ifc
+)
+
+
+install(
+ TARGETS
+ ${LIB}
+ DESTINATION
+ lib
+)
+
+install(
+ FILES
+ ${LIB_INC}
+ DESTINATION
+ include
+)
+
diff --git a/COMMON/Staze/E2GDaty.cpp b/COMMON/Staze/E2GDaty.cpp
index ff618c8..498148b 100644
--- a/COMMON/Staze/E2GDaty.cpp
+++ b/COMMON/Staze/E2GDaty.cpp
@@ -3,6 +3,7 @@
#include "E2GDaty.h"
#include "E2GWyjatek.h"
#include "E2GBlStaze.h"
+#include <cstring>
#define MIN_DATE (-693593L) /* about year 1 */
#define MAX_DATE 2958465L /* about year 9999 */
diff --git a/COMMON/Staze/E2GOkresy.cpp b/COMMON/Staze/E2GOkresy.cpp
index 2882f96..c3e32e0 100644
--- a/COMMON/Staze/E2GOkresy.cpp
+++ b/COMMON/Staze/E2GOkresy.cpp
@@ -1,5 +1,6 @@
//---------------------------------------------------------------------------
+#include <cstring>
#include <sstream>
#include <algorithm>
#include <stdio.h>
diff --git a/COMMON/Staze/E2GSSlOkresow.cpp b/COMMON/Staze/E2GSSlOkresow.cpp
index 18be3a2..bf39b63 100644
--- a/COMMON/Staze/E2GSSlOkresow.cpp
+++ b/COMMON/Staze/E2GSSlOkresow.cpp
@@ -2,6 +2,7 @@
#include <algorithm>
#include <stdio.h>
+#include <cstring>
#include "E2GCmnStaze.h"
#include "E2GSSlOkresow.h"
--
2.40.1