From fe107c0e553c8aec37e87ef7219f3368a388b8eb Mon Sep 17 00:00:00 2001
From: IgorekLoschinin <igor.loschinin2014@yandex.ru>
Date: Wed, 7 Apr 2021 22:33:49 +0300
Subject: [PATCH 1/3] ref #6 Added submodule QuasarAppLib

---
 .gitmodules                      | 6 +++---
 CMake                            | 1 -
 CMakeLists.txt                   | 4 ++--
 src/CMakeLists.txt               | 8 +++++---
 src/CopyrighFixer/CMakeLists.txt | 6 +++---
 src/QuasarAppLib                 | 1 +
 tests/CMakeLists.txt             | 4 ++--
 7 files changed, 16 insertions(+), 14 deletions(-)
 delete mode 160000 CMake
 create mode 160000 src/QuasarAppLib

diff --git a/.gitmodules b/.gitmodules
index d892894..0d75895 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,3 @@
-[submodule "CMake"]
-	path = CMake
-	url = https://github.com/QuasarApp/CMake.git
+[submodule "src/QuasarAppLib"]
+	path = src/QuasarAppLib
+	url = https://github.com/QuasarApp/QuasarAppLib.git
diff --git a/CMake b/CMake
deleted file mode 160000
index c59a0c8..0000000
--- a/CMake
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit c59a0c81555a281273b38095613472abc0fe73b7
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 65df214..816a207 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,8 +17,8 @@ set (QT_VERSION_MAJOR OFF)
 find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Test QUIET)
 find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Test QUIET)
 
-include(CMake/ccache.cmake)
-include(CMake/QuasarAppCITargets.cmake)
+include(./src/QuasarAppLib/CMake/ccache.cmake)
+include(./src/QuasarAppLib/CMake/QuasarAppCITargets.cmake)
 
 # Add sub directories
 add_subdirectory(src)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f3869ef..b964ad1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -17,9 +17,11 @@ set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 
 
-include(../CMake/ProjectOut.cmake)
-include(../CMake/Version.cmake)
-include(../CMake/QtUtils.cmake)
+include(./QuasarAppLib/CMake/ProjectOut.cmake)
+include(./QuasarAppLib/CMake/Version.cmake)
+include(./QuasarAppLib/CMake/QtUtils.cmake)
 
+add_subdirectory(QuasarAppLib)
 add_subdirectory(CFixer)
 add_subdirectory(CopyrighFixer)
+
diff --git a/src/CopyrighFixer/CMakeLists.txt b/src/CopyrighFixer/CMakeLists.txt
index 144d038..823001d 100644
--- a/src/CopyrighFixer/CMakeLists.txt
+++ b/src/CopyrighFixer/CMakeLists.txt
@@ -25,9 +25,9 @@ set(PRIVATE_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Private")
 
 add_library(${PROJECT_NAME} ${SOURCE_CPP})
 
-if (${QT_VERSION_MAJOR})
-    target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core)
-endif()
+target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core)
+target_link_libraries(${PROJECT_NAME} PUBLIC QuasarApp)
+
 
 target_include_directories(${PROJECT_NAME} PUBLIC ${PUBLIC_INCUDE_DIR})
 target_include_directories(${PROJECT_NAME} PRIVATE ${PRIVATE_INCUDE_DIR})
diff --git a/src/QuasarAppLib b/src/QuasarAppLib
new file mode 160000
index 0000000..a7f5756
--- /dev/null
+++ b/src/QuasarAppLib
@@ -0,0 +1 @@
+Subproject commit a7f5756f524159279461e664ebaaf8c4c0db4c28
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 64beec4..53c781b 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -9,7 +9,7 @@ cmake_minimum_required(VERSION 3.14)
 
 set(CURRENT_PROJECT ${PROJECT_NAME}Test)
 
-include(../CMake/ProjectOut.cmake)
+include(../src/QuasarAppLib/CMake/ProjectOut.cmake)
 
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 set(CMAKE_AUTOMOC ON)
@@ -34,6 +34,6 @@ target_link_libraries(${CURRENT_PROJECT} PRIVATE Qt::Test CopyrighFixer)
 target_include_directories(${CURRENT_PROJECT} PUBLIC ${PUBLIC_INCUDE_DIR})
 
 
-include(../CMake/QuasarAppCITargets.cmake)
+include(../src/QuasarAppLib/CMake/QuasarAppCITargets.cmake)
 initTests()
 addTests(${PROJECT_NAME} ${CURRENT_PROJECT})

From 878ac66c26b095e07c96ac277705cef5566c6594 Mon Sep 17 00:00:00 2001
From: IgorekLoschinin <igor.loschinin2014@yandex.ru>
Date: Mon, 12 Apr 2021 22:45:49 +0300
Subject: [PATCH 2/3] ref #6 Connecting and using the QuasarAppLib.

---
 CMake                            | 1 +
 src/CFixer/main.cpp              | 9 +++++++++
 src/CopyrighFixer/CMakeLists.txt | 3 +--
 3 files changed, 11 insertions(+), 2 deletions(-)
 create mode 160000 CMake

diff --git a/CMake b/CMake
new file mode 160000
index 0000000..c59a0c8
--- /dev/null
+++ b/CMake
@@ -0,0 +1 @@
+Subproject commit c59a0c81555a281273b38095613472abc0fe73b7
diff --git a/src/CFixer/main.cpp b/src/CFixer/main.cpp
index f3f95a6..eb68693 100644
--- a/src/CFixer/main.cpp
+++ b/src/CFixer/main.cpp
@@ -5,6 +5,15 @@
 //# of this license document, but changing it is not allowed.
 //#
 
+#include <quasarapp.h>
+
 int main(int argc, char *argv[]) {
+
+    if (!QuasarAppUtils::Params::parseParams(argc, argv)) {
+        QuasarAppUtils::Params::log("wrong parametrs", QuasarAppUtils::Warning);
+        exit(0);
+
+    }
+
     return 0;
 }
diff --git a/src/CopyrighFixer/CMakeLists.txt b/src/CopyrighFixer/CMakeLists.txt
index 823001d..9f16937 100644
--- a/src/CopyrighFixer/CMakeLists.txt
+++ b/src/CopyrighFixer/CMakeLists.txt
@@ -25,8 +25,7 @@ set(PRIVATE_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Private")
 
 add_library(${PROJECT_NAME} ${SOURCE_CPP})
 
-target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core)
-target_link_libraries(${PROJECT_NAME} PUBLIC QuasarApp)
+target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core QuasarApp)
 
 
 target_include_directories(${PROJECT_NAME} PUBLIC ${PUBLIC_INCUDE_DIR})

From 0c5b60d6523d362073132f4686e6f61f964d6235 Mon Sep 17 00:00:00 2001
From: IgorekLoschinin <igor.loschinin2014@yandex.ru>
Date: Mon, 12 Apr 2021 23:16:39 +0300
Subject: [PATCH 3/3] ref #6 Delete dir CMake

---
 CMake | 1 -
 1 file changed, 1 deletion(-)
 delete mode 160000 CMake

diff --git a/CMake b/CMake
deleted file mode 160000
index c59a0c8..0000000
--- a/CMake
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit c59a0c81555a281273b38095613472abc0fe73b7