diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..791b3b8
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,47 @@
+Language: Cpp
+AccessModifierOffset: -4
+AlignAfterOpenBracket: true
+AlignEscapedNewlinesLeft: true
+AlignTrailingComments: true
+AllowAllParametersOfDeclarationOnNextLine: true
+AllowShortBlocksOnASingleLine: false
+AllowShortCaseLabelsOnASingleLine: true
+AllowShortFunctionsOnASingleLine: All
+AllowShortIfStatementsOnASingleLine: true
+AllowShortLoopsOnASingleLine: false
+AlwaysBreakBeforeMultilineStrings: false
+AlwaysBreakTemplateDeclarations: true
+BinPackArguments: true
+BinPackParameters: true
+BreakBeforeBinaryOperators: false
+BreakBeforeBraces: Custom
+BraceWrapping:
+ AfterClass: true
+ AfterFunction: true
+BreakBeforeTernaryOperators: false
+BreakConstructorInitializersBeforeComma: false
+ColumnLimit: 0
+CommentPragmas: '^ IWYU pragma:'
+ConstructorInitializerAllOnOneLineOrOnePerLine: false
+ConstructorInitializerIndentWidth: 4
+ContinuationIndentWidth: 4
+Cpp11BracedListStyle: true
+DerivePointerAlignment: false
+DisableFormat: false
+IndentCaseLabels: false
+IndentFunctionDeclarationAfterType: false
+IndentWidth: 4
+KeepEmptyLinesAtTheStartOfBlocks: false
+MaxEmptyLinesToKeep: 2
+NamespaceIndentation: None
+PointerAlignment: Left
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeParens: ControlStatements
+SpaceInEmptyParentheses: false
+SpacesBeforeTrailingComments: 1
+SpacesInAngles: false
+SpacesInContainerLiterals: true
+SpacesInCStyleCastParentheses: false
+SpacesInParentheses: false
+Standard: c++17
+UseTab: Never
diff --git a/.clang-tidy b/.clang-tidy
new file mode 100644
index 0000000..27616ad
--- /dev/null
+++ b/.clang-tidy
@@ -0,0 +1,2 @@
+Checks: '-*,bugprone-argument-comment'
+WarningsAsErrors: bugprone-argument-comment
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..dfe0770
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+# Auto detect text files and perform LF normalization
+* text=auto
diff --git a/.github/workflows/sync-from-template.yml b/.github/workflows/sync-from-template.yml
new file mode 100644
index 0000000..912e419
--- /dev/null
+++ b/.github/workflows/sync-from-template.yml
@@ -0,0 +1,114 @@
+---
+#
+# - Run this workflow to pull changes from the template repository.
+#
+# - Clone this repository. Check out a branch
+# - Copy files from the template onto this clone
+# - Push the branch to this repository
+# - Create a pull request in this repository
+#
+
+name: Sync changes from template project.
+
+on:
+ # cronjob trigger
+ schedule:
+ - cron: "17 5 * * 5"
+
+ # Run when this file changes
+ push:
+ paths:
+ - .github/workflows/sync-from-template.yml
+
+ # Run when manually triggered
+ workflow_dispatch:
+
+env:
+ BASE_BRANCH: main
+ HEAD_BRANCH: chore/sync-from-template
+ GIT_AUTHOR_NAME: ${{ github.repository_owner }}
+ GIT_AUTHOR_EMAIL: ${{ github.repository_owner }}@users.noreply.github.com
+ REPO_TEMPLATE: KambizAsadzadeh/Project-Template
+ THIS_REPO: ${{ github.repository }}
+
+jobs:
+ sync-from-template:
+ # Do not run on the template repository itself
+ if: github.repository != 'KambizAsadzadeh/Project-Template'
+ name: Sync changes from KambizAsadzadeh/Project-Template
+ runs-on: ubuntu-latest
+ continue-on-error: true
+
+ steps:
+ # Clone the template repository
+ - name: Check out template repository
+ uses: actions/checkout@v2
+ with:
+ repository: ${{ env.REPO_TEMPLATE }}
+ token: ${{ github.token }}
+ path: ${{ env.REPO_TEMPLATE }}
+
+ # Clone the target repository. Check out a branch
+ - name: Check out ${{ github.repository }}
+ uses: actions/checkout@v2
+ with:
+ repository: ${{ github.repository }}
+ token: ${{ github.token }}
+ path: ${{ github.repository }}
+ - name: Create branch in ${{ env.THIS_REPO }}
+ run: |
+ git -C "${THIS_REPO}" fetch origin "${HEAD_BRANCH}" || true
+ git -C "${THIS_REPO}" branch -a
+ git -C "${THIS_REPO}" checkout -B "${HEAD_BRANCH}" \
+ "remotes/origin/${HEAD_BRANCH}" || \
+ git -C "${THIS_REPO}" checkout -b "${HEAD_BRANCH}"
+
+ # Copy files from the template onto the target clone
+ - name: Copy template contents
+ run: |
+ _files="$(find ${REPO_TEMPLATE} \
+ ! -path "*/.git/*" \
+ ! -path "*/.github/workflows/*" \
+ ! -name ".gitignore" \
+ ! -name "README.md" \
+ -type f \
+ -print)"
+ for _file in ${_files}; do
+ _src="${_file}"
+ _dst="${THIS_REPO}/${_file#${REPO_TEMPLATE}/}"
+ # TODO: Find a more robust / elegant way to get this :point_down:
+ _dst="${_dst%/*}/"
+ mkdir -p "${_dst}"
+ echo "INFO: Copy '${_src}' to '${_dst}'."
+ cp "${_src}" "${_dst}"
+ done
+ git -C "${THIS_REPO}" diff
+
+ # Commit changes, if there are any
+ - name: Commit changes, if any
+ run: |
+ git -C ${THIS_REPO} config user.name "${GIT_AUTHOR_NAME}"
+ git -C ${THIS_REPO} config \
+ user.email "${GIT_AUTHOR_EMAIL}"
+ git -C ${THIS_REPO} add .
+ git -C ${THIS_REPO} commit \
+ -m "Sync from template@${{ github.sha }}"
+
+ # Push the branch to the target repository
+ - name: Push topic branch
+ run: git -C ${THIS_REPO} push -u origin "${HEAD_BRANCH}"
+
+ # Create a pull request in the target repository
+ - name: Create pull request
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ GITHUB_USER: ${{ github.actor }}
+ run: |
+ pushd ${THIS_REPO}
+ hub pull-request \
+ -b "${BASE_BRANCH}" \
+ -h "${HEAD_BRANCH}" \
+ --no-edit \
+ -m "Pull updates from ${REPO_TEMPLATE}" \
+ -m "Pull updates from ${REPO_TEMPLATE}"
+ popd
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a8cbee4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,38 @@
+# Prerequisites
+*.d
+
+# Compiled Object files
+*.slo
+*.lo
+*.o
+*.obj
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Compiled Dynamic libraries
+*.so
+*.dylib
+*.dll
+
+# Fortran module files
+*.mod
+*.smod
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+*.lib
+
+# Executables
+*.exe
+*.out
+*.app
+
+#Extra
+.DS_Store
+
+# Final Output
+build/ProjectTemplate
diff --git a/.idea/Project-Template.iml b/.idea/Project-Template.iml
new file mode 100644
index 0000000..f08604b
--- /dev/null
+++ b/.idea/Project-Template.iml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..79b3c94
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..5ecf0a8
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CITATION.md b/CITATION.md
new file mode 100644
index 0000000..4e57050
--- /dev/null
+++ b/CITATION.md
@@ -0,0 +1,11 @@
+cff-version: 1.2.0
+message: "If you use this software, please cite it as below."
+authors:
+- family-names: "Asadzadeh"
+ given-names: "Kambiz"
+ orcid: "https://orcid.org/0009-0009-2065-3977"
+title: "PT"
+version: 1.1.222
+date-released: 2023-04-25
+url: "https://kambizasadzadeh.com"
+repository-code: "https://github.com/genyleap/Project-Template"
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..3382e97
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,467 @@
+# -------------------- PROJECT TEMPLATE INFO ---------------------------------------------
+# Title : Project Template
+# Version : 1.2.20
+# Author : Kambiz Asadzadeh (compez.eth)
+# License : MIT
+# Url : https://github.com/genyleap/Project-Template
+# Organization : Genyleap
+# ----------------------------------------------------------------------------------------
+
+cmake_minimum_required(VERSION 3.23)
+cmake_policy(SET CMP0048 NEW)
+
+# Add include path for cmake modules
+# ------ PROJECT EXTRA CMAKE ------
+
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/config/")
+
+include(ExternalProject)
+include(FetchContent)
+
+# ------ PROJECT INFO ------
+# Options
+set(PROJECT_NAME "PT" CACHE STRING "Project Name.") #You can change "ProjectTemplate" with your project name.
+set(PROJECT_TARGET ${PROJECT_NAME} CACHE STRING "Project Target Name.")
+
+set(PROJECT_VERSION_MAJOR 1)
+set(PROJECT_VERSION_MINOR 0)
+set(PROJECT_VERSION_PATCH 6)
+
+# ---- Project settings ----
+set_property(GLOBAL APPEND PROPERTY USE_FOLDERS ON)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+if(NOT DEFINED CMAKE_CXX_STANDARD)
+ set(CMAKE_CXX_STANDARD 23)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+ set(CMAKE_CXX_EXTENSIONS ON)
+endif()
+
+set(PROJECT_CREATOR "Kambiz Asadzadeh" CACHE STRING "Creator of your project.") #Your project creator.
+
+set(PROJECT_LICENSE_TYPE "MIT" CACHE STRING "Project License Type.") #Your project license type.
+
+if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
+ execute_process(
+ COMMAND git rev-parse --short HEAD
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ OUTPUT_VARIABLE PROJECT_VERSION_TAG
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+
+endif()
+if(NOT PROJECT_VERSION_TAG)
+ set(PROJECT_VERSION_TAG 00000000)
+endif()
+set(PROJECT_VERSION_TAG_HEX 0x${PROJECT_VERSION_TAG})
+set(PROJECT_VERSION_TYPE "final" CACHE STRING "Version type.")
+set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
+set(PROJECT_VERSION_STRING ${PROJECT_VERSION}-${PROJECT_VERSION_TYPE})
+
+# Supported languages include C, CXX (i.e. C++), CUDA, OBJC (i.e. Objective-C), OBJCXX, Fortran, HIP, ISPC, and ASM. By default C and CXX are enabled if no language options are given.
+# Specify language NONE, or use the LANGUAGES keyword and list no languages, to skip enabling any languages.
+set(PROJECT_LANGUAGES CXX)
+
+#Use these keys [application, library]
+set(PROJECT_USAGE_TYPE "application" CACHE STRING "Usage Type.")
+
+#Use these keys [stl, qt, qtwidget, qtquick]
+set(PROJECT_MAIN_TYPE "qtquick" CACHE STRING "Library System.")
+
+set(DEVELOPER_BUNDLE_IDENTIFIER com.kambizasadzadeh.app.${PROJECT_NAME} CACHE STRING "Developer Bundle Identifier.")
+
+#You can replace your project description with this string.
+set(PROJECT_DESCRIPTION "A concept mobile app UI/UX prototype based on Qt Quick technology." CACHE STRING "Project Description")
+
+#Your project website address.
+set(PROJECT_HOMEPAGE_URL "https://kambizasadzadeh.com" CACHE STRING "Project URL.")
+
+#Project pre-configuration system.
+configure_file(
+ ${PROJECT_SOURCE_DIR}config.hpp.in
+ ${PROJECT_SOURCE_DIR}config.hpp
+)
+
+project(
+ ${PROJECT_NAME}
+ LANGUAGES ${PROJECT_LANGUAGES}
+ DESCRIPTION ${PROJECT_DESCRIPTION}
+ HOMEPAGE_URL ${PROJECT_HOMEPAGE_URL}
+ VERSION ${PROJECT_VERSION}
+ )
+
+# ------ PROJECT CONFIG ------
+include(project-setting)
+if(project-setting)
+ return()
+endif()
+set(project-setting ON)
+
+# ------ CROSS-COMPILE CONFIG ------
+include(cross-compile)
+if(cross-compile)
+ return()
+endif()
+set(cross-compile ON)
+
+# ------ PROJECT CONFIG ------
+include(color-message)
+if(color-message)
+ return()
+endif()
+set(color-message ON)
+
+# ------ COMPILER CONFIG ------
+include(compiler-options)
+if(compiler-options)
+ return()
+endif()
+set(compiler-options ON)
+
+# ------ PACKAGES CONFIG ------
+include(packages)
+if(packages)
+ return()
+endif()
+set(packages ON)
+
+if(NOT PROJECT_MAIN_TYPE STREQUAL "stl")
+ set(CMAKE_AUTOUIC ON)
+ set(CMAKE_AUTOMOC ON)
+ set(CMAKE_AUTORCC ON)
+endif()
+
+set(SUFFIX_EXTRA *.in)
+set(SUFFIX_HPPHEADER *.hpp)
+set(SUFFIX_IPPHEADER *.ipp)
+set(SUFFIX_INLHEADER *.inl)
+set(SUFFIX_SOURCE *.cpp)
+set(SUFFIX_CONFIG *.json)
+
+if(PROJECT_MAIN_TYPE STREQUAL "qtwidget")
+ set(SUFFIX_WIDGET *.ui)
+elseif(PROJECT_MAIN_TYPE STREQUAL "qtquick")
+ set(SUFFIX_QML *.qml)
+ set(SUFFIX_QRC *.qrc)
+endif()
+
+file(GLOB PRECOMPILED precompiled/pch.hpp)
+file(GLOB HEADERS
+ source/${SUFFIX_HPPHEADER}
+ source/${SUFFIX_IPPHEADER}
+ source/${SUFFIX_INLHEADER}
+)
+file(GLOB SOURCES source/${SUFFIX_SOURCE})
+
+#file(GLOB EXAMPLES
+# source/examples/${SUFFIX_HPPHEADER}
+# source/examples/${SUFFIX_SOURCE}
+#)
+
+file(GLOB UTILS
+ utilities/${SUFFIX_HPPHEADER}
+ utilities/${SUFFIX_SOURCE}
+)
+
+if(${PROJECT_MAIN_TYPE} STREQUAL "stl")
+ set(HAS_USER_INTERFACE false)
+ file(GLOB MAIN_ENTRY_POINT
+ source/entrypoint/stl/${SUFFIX_HPPHEADER}
+ source/entrypoint/stl/${SUFFIX_SOURCE}
+ )
+elseif(${PROJECT_MAIN_TYPE} STREQUAL "qt")
+ file(GLOB MAIN_ENTRY_POINT
+ source/entrypoint/qt/nogui/${SUFFIX_HPPHEADER}
+ source/entrypoint/qt/nogui/${SUFFIX_SOURCE}
+ )
+elseif(${PROJECT_MAIN_TYPE} STREQUAL "qtwidget")
+ file(GLOB MAIN_ENTRY_POINT
+ source/entrypoint/qt/qtwidget/${SUFFIX_HPPHEADER}
+ source/entrypoint/qt/qtwidget/${SUFFIX_SOURCE}
+ ui/widgets/${SUFFIX_HPPHEADER}
+ ui/widgets/${SUFFIX_SOURCE}
+ )
+elseif(${PROJECT_MAIN_TYPE} STREQUAL "qtquick")
+ file(GLOB MAIN_ENTRY_POINT
+ source/entrypoint/qt/qtquick/${SUFFIX_HPPHEADER}
+ source/entrypoint/qt/qtquick/${SUFFIX_SOURCE}
+ )
+endif()
+if(${PROJECT_MAIN_TYPE} STREQUAL "qtwidget")
+ file(GLOB UI_SOURCE ui/widgets/${SUFFIX_WIDGET})
+endif()
+if(${PROJECT_MAIN_TYPE} STREQUAL "qtquick")
+ file(GLOB UI_SOURCE ui/qtquick/${SUFFIX_QRC})
+ file(GLOB UI_QML_SOURCE ui/qtquick/${SUFFIX_QML})
+endif()
+
+file(GLOB_RECURSE src_files ui/qtquick/${SUFFIX_QML})
+
+FOREACH(LETTER ${src_files})
+ string(REGEX REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" fileList "${LETTER}")
+ message(${fileList})
+ list(APPEND UI_QML_FILES ${fileList})
+ENDFOREACH()
+
+file(GLOB CONFIGFILE config/${SUFFIX_CONFIG})
+
+file(GLOB SOURCESFILE
+ #---C++---
+ ${MAIN_ENTRY_POINT}
+ ${HEADERS}
+ ${SOURCES}
+ ${UI_SOURCE}
+ ${UI_QML_SOURCE}
+ ${UTILS}
+ ${CONFIGFILE}
+ ${PRECOMPILED}
+ ${EXAMPLES}
+ )
+
+source_group("PrecompiledHeaders" FILES ${PRECOMPILED})
+source_group("Utilities" FILES ${UTILS})
+source_group("Entry Point (Main)" FILES ${MAIN_ENTRY_POINT})
+source_group("Base" FILES ${HEADERS} ${SOURCES})
+source_group("UI" FILES ${UI_SOURCE})
+source_group("UI/QML" FILES ${UI_QML_SOURCE})
+source_group("Config" FILES ${CONFIGFILE})
+source_group("Examples" FILES ${EXAMPLES})
+
+# ------ OUTPUTS CONFIG ------
+message(STATUS "${BoldRed}------ ${PROJECT_TARGET} Tools Configuration ------${ColourReset}")
+message(STATUS "${Bold}Language Standard${ColourReset} : C++[${CMAKE_CXX_STANDARD}]")
+message(STATUS "${Bold}Compiler${ColourReset} : ${CMAKE_CXX_COMPILER_ID}")
+message(STATUS "${Bold}Compiler Version${ColourReset} : ${CMAKE_CXX_COMPILER_VERSION}")
+message(STATUS "${Bold}OS Target${ColourReset} : ${CMAKE_HOST_SYSTEM}")
+message(STATUS "${Bold}OS Version${ColourReset} : ${CMAKE_HOST_SYSTEM_VERSION}")
+message(STATUS "${Bold}System Architecture${ColourReset} : ${OS_ARCHITECTURES}")
+message(STATUS "${Bold}Project License${ColourReset} : ${PROJECT_LICENSE_TYPE}")
+message(STATUS "${BoldBlue}------ ${PROJECT_TARGET} Framework Info ------${ColourReset}")
+message(STATUS "${Bold}Name${ColourReset} : ${CMAKE_PROJECT_NAME}")
+message(STATUS "${Bold}Description${ColourReset} : ${CMAKE_PROJECT_DESCRIPTION}")
+message(STATUS "${Bold}Version${ColourReset} : ${PROJECT_VERSION}")
+message(STATUS "${Bold}Full Version${ColourReset} : ${PROJECT_VERSION_STRING}")
+message(STATUS "${Bold}Creator${ColourReset} : ${PROJECT_CREATOR}")
+message(STATUS "${BoldBlue}------ ${PROJECT_TARGET} Project Configuration ------${ColourReset}")
+message(STATUS "${Bold}DEVELOPER${ColourReset} : ${PROJECT_CREATOR}")
+message(STATUS "${Bold}PROJECT_PROJECT${ColourReset} : ${PROJECT_NAME}")
+message(STATUS "${Bold}PROJECT_TARGET${ColourReset} : ${PROJECT_TARGET}")
+message(STATUS "${Bold}PROJECT_VERSION${ColourReset} : ${PROJECT_VERSION}")
+message(STATUS "${Bold}PROJECT_VERSION_TYPE${ColourReset} : ${Underscore}${PROJECT_VERSION_TYPE}${ColourReset}")
+message(STATUS "${BoldBlue}------ ${PROJECT_TARGET} Building Configuration ------${ColourReset}")
+message(STATUS "${Bold}PROJECT_BUILD_SHARED${ColourReset} : ${PROJECT_BUILD_SHARED}")
+message(STATUS "${Bold}PROJECT_VERSION_TAG_HEX${ColourReset} : ${PROJECT_VERSION_TAG_HEX}")
+message(STATUS "${Bold}PROJECT_FOLDER_SUFFIX${ColourReset} : ${PROJECT_FOLDER_SUFFIX}")
+message(STATUS "${Bold}LIBRARY_OUTPUT_PATH${ColourReset} : ${LIBRARY_OUTPUT_PATH}")
+message(STATUS "${Bold}CMAKE_CURRENT_SOURCE_DIR${ColourReset} : ${CMAKE_CURRENT_SOURCE_DIR}")
+message(STATUS "${BoldBlue}------ ${PROJECT_TARGET} End Configuration ------${ColourReset}")
+
+if(GUI_APPLICATION AND PROJECT_MAIN_TYPE STREQUAL "qt" OR PROJECT_MAIN_TYPE STREQUAL "qtwidget" OR PROJECT_MAIN_TYPE STREQUAL "qtquick")
+ if(USE_QT5_FEATURES)
+ if(${PROJECT_MAIN_TYPE} STREQUAL "qt")
+ list(APPEND QT_MODULES Core Core5Compat)
+ list(APPEND QT_MODULES_LINK
+ Qt${QT_VERSION_MAJOR}::Core
+ Qt${QT_VERSION_MAJOR}::Core5Compat
+ )
+ find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Core5Compat)
+ find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Core5Compat)
+ elseif(${PROJECT_MAIN_TYPE} STREQUAL "qtwidget")
+ list(APPEND QT_MODULES Core Widgets Core5Compat)
+ list(APPEND QT_MODULES_LINK
+ Qt${QT_VERSION_MAJOR}::Core
+ Qt${QT_VERSION_MAJOR}::Widgets
+ Qt${QT_VERSION_MAJOR}::Core5Compat
+ )
+ find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Widgets Core5Compat)
+ find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Core5Compat)
+ elseif(${PROJECT_MAIN_TYPE} STREQUAL "qtquick")
+ list(APPEND QT_MODULES Core Quick Core5Compat)
+ list(APPEND QT_MODULES_LINK
+ Qt${QT_VERSION_MAJOR}::Core
+ Qt${QT_VERSION_MAJOR}::Quick
+ Qt${QT_VERSION_MAJOR}::Core5Compat
+ )
+ find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Quick Core5Compat)
+ find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Quick Core5Compat)
+ else()
+ list(APPEND QT_MODULES Core Core5Compat)
+ list(APPEND QT_MODULES_LINK
+ Qt${QT_VERSION_MAJOR}::Core
+ Qt${QT_VERSION_MAJOR}::Core5Compat
+ )
+ find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Core5Compat)
+ find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Core5Compat)
+ endif()
+ else()
+ if(${PROJECT_MAIN_TYPE} STREQUAL "qt")
+ list(APPEND QT_MODULES Core)
+ list(APPEND QT_MODULES_LINK
+ Qt${QT_VERSION_MAJOR}::Core
+ )
+ find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
+ find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core)
+ elseif(${PROJECT_MAIN_TYPE} STREQUAL "qtwidget")
+ list(APPEND QT_MODULES Core Widgets)
+ list(APPEND QT_MODULES_LINK
+ Qt${QT_VERSION_MAJOR}::Core
+ Qt${QT_VERSION_MAJOR}::Widgets
+ )
+ find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)
+ find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
+ elseif(${PROJECT_MAIN_TYPE} STREQUAL "qtquick")
+ list(APPEND QT_MODULES Core${SPACE_ARG})
+ list(APPEND QT_MODULES Quick${SPACE_ARG})
+ list(APPEND QT_MODULES_LINK
+ Qt${QT_VERSION_MAJOR}::Quick
+ )
+ find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Quick)
+ find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Quick)
+ endif()
+ endif()
+
+ qt_standard_project_setup(REQUIRES 6.5)
+
+ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
+ if(PROJECT_USAGE_TYPE STREQUAL "library")
+ qt_add_library(${PROJECT_NAME}
+ MANUAL_FINALIZATION
+ ${SOURCESFILE}
+ )
+ else()
+ if(${PROJECT_MAIN_TYPE} STREQUAL "qtquick")
+ qt_add_resources(SOURCESFILE ui/qtquick/qml.qrc)
+ endif()
+ qt_add_executable(${PROJECT_NAME} MANUAL_FINALIZATION ${SOURCESFILE})
+ if(${PROJECT_MAIN_TYPE} STREQUAL "qtquick")
+ if(USE_QT_QUICK_COMPILER)
+ qt_add_qml_module(${PROJECT_NAME}
+ URI ${PROJECT_NAME}
+ VERSION 1.0
+ RESOURCE_PREFIX /app.genyleap.com/import
+ OUTPUT_DIRECTORY ""
+ QML_FILES ${UI_QML_FILES}
+ )
+ endif()
+ endif()
+ endif()
+ else()
+ if(ANDROID)
+ add_library(${PROJECT_NAME} SHARED
+ ${SOURCESFILE}
+ )
+ else()
+ if(PROJECT_USAGE_TYPE STREQUAL "library")
+ add_library(${PROJECT_NAME}
+ ${SOURCESFILE}
+ )
+ else()
+ add_executable(${PROJECT_NAME}
+ ${SOURCESFILE}
+ )
+ endif()
+ endif()
+ endif()
+
+ #Extra Targets & Modules
+ target_link_libraries(${PROJECT_NAME} PRIVATE
+ ${LIB_STL_MODULES_LINKER}
+ ${LIB_MODULES}
+ ${QT_MODULES_LINK}
+ ${OS_LIBS}
+ )
+
+ #Extra Modules
+ target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/source PRIVATE source ${LIB_TARGET_INCLUDE_DIRECTORIES})
+ target_link_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/source ${LIB_TARGET_LINK_DIRECTORIES})
+
+ set_target_properties(${PROJECT_NAME} PROPERTIES
+ MACOSX_BUNDLE_GUI_IDENTIFIER ${DEVELOPER_BUNDLE_IDENTIFIER}
+ MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
+ MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
+ MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/properties/${PLATFORM_FOLDER}/Info.plist.in"
+ MACOSX_BUNDLE TRUE
+ WIN32_EXECUTABLE TRUE
+ )
+
+if(ANDROID)
+ include(${ANDROID_SDK_ROOT}/android_openssl/CMakeLists.txt)
+endif()
+
+if(QT_VERSION_MAJOR GREATER_EQUAL 6.0) #From Qt.6.0
+ if(${PROJECT_MAIN_TYPE} STREQUAL "qtquick")
+ qt_import_qml_plugins(${PROJECT_NAME})
+ endif()
+ if(QT_VERSION GREATER_EQUAL 6.2) #From Qt6.2
+ qt_finalize_target(${PROJECT_NAME})
+ endif()
+ if(WIN32)
+ qt_disable_unicode_defines(${PROJECT_NAME})
+ qt_allow_non_utf8_sources(${PROJECT_NAME})
+ endif()
+endif()
+
+else()
+ if(ANDROID)
+ add_library(${PROJECT_NAME} SHARED
+ ${SOURCESFILE}
+ )
+ else()
+ if(PROJECT_USAGE_TYPE STREQUAL "library")
+ add_library(${PROJECT_NAME}
+ ${SOURCESFILE}
+ )
+ else()
+ add_executable(${PROJECT_NAME}
+ ${SOURCESFILE}
+ )
+ endif()
+ endif()
+
+ #Extra Targets & Modules
+ target_link_libraries(${PROJECT_NAME} PRIVATE
+ ${LIB_STL_MODULES_LINKER}
+ ${LIB_MODULES}
+ ${OS_LIBS}
+ )
+ target_include_directories(${PROJECT_NAME}
+ PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/source PRIVATE source
+ ${LIB_TARGET_INCLUDE_DIRECTORIES}
+ )
+
+ target_link_directories(${PROJECT_NAME}
+ PRIVATE
+ ${CMAKE_CURRENT_SOURCE_DIR}/source
+ ${LIB_TARGET_LINK_DIRECTORIES}
+ )
+
+ set_target_properties(${PROJECT_NAME} PROPERTIES
+ MACOSX_BUNDLE_GUI_IDENTIFIER ${DEVELOPER_BUNDLE_IDENTIFIER}
+ MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
+ MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
+ MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/properties/${PLATFORM_FOLDER}/Info.plist.in"
+ MACOSX_BUNDLE TRUE
+ WIN32_EXECUTABLE TRUE
+ )
+
+endif()
+
+target_compile_definitions(${PROJECT_NAME} PUBLIC ${LIB_TARGET_COMPILER_DEFINATION})
+
+#This command generates installation rules for a project.
+#Install rules specified by calls to the install() command within a source directory. are executed in order during installation.
+install(TARGETS ${PROJECT_NAME} DESTINATION build/bin)
+
+file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/config/system-config.json DESTINATION ${CMAKE_BINARY_DIR}/config/)
+
+#Ignore unused files.
+list(APPEND CPACK_SOURCE_IGNORE_FILES /.git/ /build/ .gitignore .DS_Store)
+
+include(InstallRequiredSystemLibraries)
+set(CPACK_GENERATOR "TGZ;ZIP")
+set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A brief description of your project")
+include(CPack)
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..0e46853
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,52 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment include:
+
+- Being respectful and inclusive of differing viewpoints and experiences.
+- Showing empathy towards others.
+- Using welcoming and inclusive language.
+- Gracefully accepting constructive criticism.
+- Focusing on what is best for the community.
+
+Examples of unacceptable behavior by participants include:
+
+- The use of sexualized language or imagery and unwelcome sexual attention or advances.
+- Trolling, insulting/derogatory comments, and personal or political attacks.
+- Public or private harassment.
+- Publishing others' private information, such as physical or electronic addresses, without explicit permission.
+- Any other conduct that could be considered inappropriate in a professional setting.
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [opencode@genyleap.com]. All complaints will be reviewed and investigated promptly and fairly.
+
+All project team members are obligated to respect the privacy and security of the reporter of any incident.
+
+## Enforcement Guidelines
+
+Project maintainers will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
+
+1. **Correction**: Community members are encouraged to engage with the person(s) responsible for the unacceptable behavior to provide feedback and address the issue.
+2. **Warning**: If the behavior continues, project maintainers may issue a formal warning that explains the consequences of continued unacceptable behavior.
+3. **Temporary Ban**: If the behavior still continues after a warning, project maintainers may temporarily ban the person(s) responsible from participating in the project's communication channels or other project-related activities.
+4. **Permanent Ban**: As a last resort, and with the approval of the project team, project maintainers may permanently ban the person(s) responsible from further participation in the project.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..f4bb8fc
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021 Kambiz
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..7eed2eb
--- /dev/null
+++ b/README.md
@@ -0,0 +1,622 @@
+# Modern Project-Template (PT)
+A template for modern C++ projects with useful features for developing cross-platform projects.
+
+## Cross-Platform project structure based on CMake ##
+This repository is a modern project template based on C++ and CMake build tool.
+
+[![forthebadge](https://forthebadge.com/images/badges/made-with-c-plus-plus.svg)](https://forthebadge.com)
+
+## Top features:
+- ✅ Very easy management of dependencies.
+- ✅ Top level macro usage.
+- ✅ Customized project structure based on your program type.
+- ✅ Advanced microprocessors.
+- ✅ Cross-Platform
+- ✅ Adapted to latest language & compiler standards.
+
+## Supported platforms:
+
+- [x] macOS
+- [x] Windows
+- [x] Linux
+- [x] freeBSD
+- [ ] OpenBSD
+- [ ] NetBSD
+- [x] iOS
+- [ ] watchOS
+- [x] Android
+
+## Supported project type:
+
+- [x] Core Application
+- [x] Desktop Application
+- [x] Embedded Application
+- [x] Mobile Application
+- [x] Library
+
+## Language Standard Support [C++2a or C++2b]
+- It depends on your compiler!
+
+## Building
+
+- You need CMake tool for building source code
+- CMake 3.23 or higher is required.
+
+```
+cd build
+cmake ..
+make
+./ProjectTemplate
+
+```
+
+> How to sync project from template source?
+- This feature is embedded in the project as Git Action.
+
+## Customization options.
+```
+cmake .. -DPROJECT_NAME="Your Project Name" -DPROJECT_CREATOR="Kambiz" -DPROJECT_VERSION_TYPE="beta" -DPROJECT_DESCRIPTION="This is my awesome project" -DPROJECT_LICENSE_TYPE="mit"
+```
+
+## Customization Note
+- Change PROJECT_NAME variable to your own project name.
+- Change PROJECT_CREATOR variable to your main project developer.
+- Change PROJECT_DESCRIPTION variable to your project description.
+- Change PROJECT_HOMEPAGE_URL variable to your project official url.
+- Change PROJECT_VERSION_TYPE variable to your project version based on semantic versioning.
+
+- The project output structure is based on "application" with gui by default, so if you want to change it, you should change the PROJECT_USAGE_TYPE and PROJECT_MAIN_TYPE variables.
+- Change the DEVELOPER_BUNDLE_IDENTIFIER variable for your own developer id, especially in Apple products, you should set it according to the bundle string in Xcode.
+- The language standard is based on C++17 by default, you can change it via CMAKE_CXX_STANDARD variable.
+- Finally, specify software version for the variables PROJECT_VERSION_MAJOR, PROJECT_VERSION_MINOR, PROJECT_VERSION_PATCH and PROJECT_VERSION_TWEAK.
+- Enjoy your project! :)
+
+## CMake module option [Dependencies]
+- These features can be useful in downloading, building, and integrating prerequisites into your project.
+- So you can set cmake option variable for enabling them.
+
+- Include latest standard of C++
+```
+cmake .. -DUSE_LATEST_STANDARD=true
+```
+
+- Include Boost library
+- This option is currently usable if it's already installed on your system.
+- I'll work on the automatic downloader version as soon as possible.
+```
+cmake .. -DUSE_BOOST=true
+```
+
+- Include Qt Framework
+```
+cmake .. -DGUI_APPLICATION=true
+```
+
+- Force to update latest version of dependencies from repositories.
+```
+cmake .. -DFORCE_UPGRADED_LIBS=false
+```
+
+
+- Include UI
+```
+cmake .. -DHAS_USER_INTERFACE=true
+```
+
+- Include project main type by [stl, qt, qtwidget, qtquick]
+- stl (Your project will be based on stl [Default]).
+- qt (Your project will be based on Qt Core only [No GUI]).
+- qtwidget (Your project will be based on C++, QtWidget [Classic GUI]).
+- qtquick (Your project will be based on C++, QtQuick and QML [Modern GUI]).
+```
+cmake .. -DPROJECT_MAIN_TYPE=stl
+```
+
+- Project Type
+- Use these keys [application, library]
+```
+cmake .. -DPROJECT_USAGE_TYPE=application
+```
+
+- Project Type
+- Use these keys [application, library]
+```
+cmake .. -DDEVELOPER_BUNDLE_IDENTIFIER=com.kambizasadzadeh.app
+```
+
+- The Qt Quick Compiler is a development add-on for Qt Quick applications which allows you to compile QML source code into the final binary. When you use this add-on, the application's startup time is significantly improved and you no longer need to deploy .qml files together with the application.
+```
+cmake .. -DUSE_QT_QUICK_COMPILER=false
+```
+
+- Include Curl library
+```
+cmake .. -DUSE_CURL=true
+```
+
+- Include FMT library
+```
+cmake .. -DUSE_FMT=true
+```
+
+- Include CppCheck library
+```
+cmake .. -DUSE_CPP_CHECK=true
+```
+
+- Include Google-Test
+```
+cmake .. -DUSE_GOOGLE_TEST=true
+```
+
+- Include Doc-Test
+```
+cmake .. -DUSE_DOC_TEST=true
+```
+
+- Include Catch2
+```
+cmake .. -DUSE_CATCH2=true
+```
+
+- Include CTRE
+```
+cmake .. -DUSE_CTRE=true
+```
+
+- Include JSon library
+```
+cmake .. -DUSE_JSON=true
+```
+
+- Include OpenSSL
+```
+cmake .. -DUSE_OPENSSL=true
+```
+
+- Include ZLib
+```
+cmake .. -DDUSE_ZLIB=true
+```
+
+## CMake module option [Compiler options]
+
+- Enabling the test of clang-tidy
+```
+cmake .. -DENABLE_CLANG_TIDY=true
+```
+
+- Build the project as minimally as possible
+```
+cmake .. -DSIMPLE_BUILD=true
+```
+
+- Enable address sanitizer
+```
+cmake .. -DENABLE_ASAN=true
+```
+
+- Enabling the build of safe codes only [check by warnings]!
+```
+cmake .. -DENABLE_WARN_MODE=true
+```
+
+- Enabling the build of safe codes only!
+```
+cmake .. -DENABLE_SAFE_ONLY=true
+```
+
+- Enable developer (debug) mode
+```
+cmake .. -DBUILD_DEBUG_MODE=true
+```
+
+- Enabling the build of debug logging
+```
+cmake .. -DDEBUG_LOGGING=true
+```
+
+- Build Static Version
+```
+cmake .. -DENABLE_STATIC_LIB_BUILD=true
+```
+
+- Developer mode
+```
+cmake .. -DENABLE_DEVELOPER_MODE=true
+```
+
+- Todo mode
+```
+cmake .. -DENABLE_TODO_MODE=true
+```
+
+- Experimental mode
+```
+cmake .. -DENABLE_EXPERIMENTAL_MODE=true
+```
+
+- Build Shared (Dynamic) Version
+```
+cmake .. -ENABLE_SHARED_LIB_BUILD=true
+```
+
+- Forcing to enable updated programming language.
+```
+cmake .. -FORCE_LATEST_STANDARD_FEATURE=true
+```
+
+- Optimization level.
+```
+cmake .. -DOPTIMIZATION_LEVEL=0
+```
+- O Disables optimization, no optimization, fast compilation and nicely debuggable code. (default)
+- 1 Some optimization. Is equivalent to 0 with no parameters. Optimization for code size and execution time, generate minimum size code.
+- 2 Moderate optimization, enables all standard optimizations. Optimization more for code size and execution time, optimizes code for maximum speed.
+- 3 Over and above 2, does aggressive optimizations that may not be compliant to language standard. Optimization more for code size and execution time
+- 4 Over and above 3, does aggressive optimizations that may not be compliant to language standard. Optimizations for size over optimizations for speed.
+- 5 O3 with fast none accurate math calculations, optimizations for speed over optimizations for size.
+
+You can set or change your project's basic information such as name, description, link, etc.
+
+```
+set(PROJECT_NAME "ProjectTemplate" CACHE STRING "Project Name")
+set(PROJECT_TARGET ${PROJECT_NAME} CACHE STRING "Target Name")
+```
+
+- Creator Name.
+```
+set(PROJECT_CREATOR "Kambiz Asadzadeh")
+```
+
+- Project name, language, description, url and version.
+```
+project(
+ ${PROJECT_NAME}
+ LANGUAGES CXX
+ DESCRIPTION "Description of your project."
+ HOMEPAGE_URL "https://kambizasadzadeh.com"
+ VERSION ${PROJECT_VERSION}
+)
+```
+
+## Configuration output
+
+```bash
+
+-- The CXX compiler identification is AppleClang 12.0.0.12000032
+-- Detecting CXX compiler ABI info
+-- Detecting CXX compiler ABI info - done
+-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
+-- Detecting CXX compile features
+-- Detecting CXX compile features - done
+-- Ready for Apple Silicon.
+-- Performing Test COMPILER_SUPPORTS_CXX23
+-- Performing Test COMPILER_SUPPORTS_CXX23 - Success
+-- Performing Test COMPILER_SUPPORTS_CXX20
+-- Performing Test COMPILER_SUPPORTS_CXX20 - Success
+-- Performing Test COMPILER_SUPPORTS_CXX17
+-- Performing Test COMPILER_SUPPORTS_CXX17 - Success
+-- Performing Test COMPILER_SUPPORTS_CXX14
+-- Performing Test COMPILER_SUPPORTS_CXX14 - Success
+-- Performing Test COMPILER_SUPPORTS_CXX11
+-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
+-- Performing Test COMPILER_SUPPORTS_CXX0X
+-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
+
+-- ------ ProjectTemplate Tools Configuration ------
+-- Language Standard : C++[20]
+-- Compiler : AppleClang
+-- Compiler Version : 12.0.0.12000032
+-- OS Target : Darwin-20.3.0
+-- OS Version :
+-- System Architecture : x86_64
+-- Project License : MIT
+-- ------ ProjectTemplate Framework Info ------
+-- Name : ProjectTemplate
+-- Description : Description of your project.
+-- Version :
+-- ------ ProjectTemplate Project Configuration ------
+-- DEVELOPER :
+-- PROJECT_PROJECT :
+-- PROJECT_TARGET : ProjectTemplate
+-- PROJECT_VERSION : 1.0.2.0
+-- PROJECT_VERSION_TYPE : final
+-- ------ ProjectTemplate Building Configuration ------
+-- PROJECT_BUILD_SHARED :
+-- PROJECT_VERSION_TAG_HEX : 0x00000000
+-- PROJECT_FOLDER_SUFFIX :
+-- LIBRARY_OUTPUT_PATH : .../Project-Template/build/lib
+-- CMAKE_CURRENT_SOURCE_DIR : .../Project-Template
+-- ------ ProjectTemplate End Configuration ------
+-- Configuring done
+```
+
+## Usage Example
+```cpp
+#if defined(HAS_USER_INTERFACE) && defined(USE_QT)
+//! Qt
+#include
+#include
+#include
+
+int main(int argc, char *argv[])
+{
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+#endif
+
+ QGuiApplication app(argc, argv);
+
+ QQmlApplicationEngine engine;
+ const QUrl url(QStringLiteral("qrc:/main.qml"));
+
+ QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
+ &app, [url](QObject *obj, const QUrl &objUrl) {
+ if (!obj && url == objUrl)
+ QCoreApplication::exit(-1);
+ }, Qt::QueuedConnection);
+ engine.load(url);
+
+ return app.exec();
+}
+#else
+
+#include
+#include "utilities/featuretest.hpp"
+
+//! Examples
+#include "examples/compilertest.hpp"
+#include "examples/platformtest.hpp"
+#include "examples/librarytest.hpp"
+#include "examples/languagetest.hpp"
+#include "examples/configtest.hpp"
+
+//!JSon [Non-STL] Features
+#include
+
+//!Google Test
+#ifdef USE_GOOGLE_TEST
+#include
+
+class Counter {
+public:
+ // Returns the current counter value, and increments it.
+ int Increment() {
+ return m_counter++;
+ }
+
+ // Returns the current counter value, and decrements it.
+ // counter can not be less than 0, return 0 in this case
+ int Decrement() {
+ if (m_counter == 0) {
+ return m_counter;
+ } else {
+ return m_counter--;
+ }
+ }
+
+ // Prints the current counter value to STDOUT.
+ void Print() const {
+ printf("%d", m_counter);
+ }
+private:
+ int m_counter;
+};
+
+//TEST UNIT
+TEST(Counter, Increment) {
+ Counter c;
+
+ // Test that counter 0 returns 0
+ EXPECT_EQ(0, c.Decrement());
+
+ // EXPECT_EQ() evaluates its arguments exactly once, so they
+ // can have side effects.
+
+ EXPECT_EQ(0, c.Increment());
+ EXPECT_EQ(1, c.Increment());
+ EXPECT_EQ(2, c.Increment());
+
+ EXPECT_EQ(3, c.Decrement());
+}
+
+#endif
+
+//!Catch2
+#ifdef USE_CATCH2
+# include
+
+#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
+
+unsigned int Factorial( unsigned int number ) {
+ return number <= 1 ? number : Factorial(number-1)*number;
+}
+
+TEST_CASE( "Factorials are computed", "[factorial]" ) {
+ REQUIRE( Factorial(1) == 1 );
+ REQUIRE( Factorial(2) == 2 );
+ REQUIRE( Factorial(3) == 6 );
+ REQUIRE( Factorial(10) == 3628800 );
+}
+
+#endif
+
+using namespace std;
+
+int main()
+{
+ cout << "Hello World!" << endl;
+
+ //!Config Test
+ ConfigTest config;
+ config.readSettings();
+
+ //!Compiler Test
+ CompilerTest compiler;
+ compiler.getCompilerInfo();
+
+ //!Platform Test
+ PlatformTest platform;
+ platform.getPlatformInfo();
+
+ //!Library Test
+ LibraryTest library;
+ library.testBoost(); // Boost
+
+ //!Language Features
+ LanguageTest language;
+ language.checkFeatures();
+
+ //!ThirdParty Library
+ ThirdPartyTest thirdPartyTest;
+ thirdPartyTest.testFmt();
+
+ return 0;
+}
+
+#endif
+```
+
+## More usage examples
+- Compiler Test
+```cpp
+cout << "Compiler Name : " << __COMPILER__ << endl;
+cout << "Compiler Version : " << __COMPILER_VER__ << endl;
+
+#if defined(__COMPILER_CLANG_LLVM_)
+ cout << "Clang compiler has been detected!\n";
+#elif defined(__COMPILER_INTEL__)
+ cout << "Intel compiler has been detected!\n";
+#elif defined(__COMPILER_MINGW__)
+ cout << "MinGW compiler has been detected!\n";
+#elif defined(__COMPILER_MINGW_64__)
+ cout << "MinGW64 compiler has been detected!\n";
+#elif defined(__COMPILER_GCC__)
+ cout << "GCC compiler has been detected!\n";
+#elif defined(__COMPILER__HEWLETT_)
+ cout << "Hewlett compiler has been detected!\n";
+#elif defined(__COMPILER_IBM__)
+ cout << "IBM compiler has been detected!\n";
+#elif defined(__COMPILER_MSVC__)
+ cout << "MSVC compiler has been detected!\n";
+#elif defined(__COMPILER_PGCC__)
+ cout << "PGCC compiler has been detected!\n";
+#elif defined(__COMPILER_ORACLE__)
+ cout << "Oracle compiler has been detected!\n";
+#endif
+
+```
+- Platform Test
+```cpp
+#if defined(PLATFORM_MAC)
+ cout << "This is macOS platform!\n";
+#elif defined(PLATFORM_WINDOWS)
+ cout << "This is Windows platform!\n";
+#elif defined(PLATFORM_LINUX)
+ cout << "This is Linux platform!\n";
+#elif defined(PLATFORM_FREEBSD)
+ cout << "This is freeBSD platform!\n";
+#elif defined(PLATFORM_OPENBSD)
+ cout << "This is openBSD platform!\n";
+#elif defined(PLATFORM_VXWORKS)
+ cout << "This is VXWorks platform!\n";
+#elif defined(PLATFORM_MOTOROLA)
+ cout << "This is Motorola platform!\n";
+#elif defined(PLATFORM_ULTRIX)
+ cout << "This is Ultrix platform!\n";
+#elif defined(PLATFORM_DOS)
+ cout << "This is Dos platform!\n";
+#elif defined(PLATFORM_WINDOWS_PHONE)
+ cout << "This is Windows Phone platform!\n";
+#elif defined(PLATFORM_IOS_SIMULATOR)
+ cout << "This is iOS Simulator platform!\n";
+#elif defined(PLATFORM_IOS)
+ cout << "This is iOS platform!\n";
+#elif defined(PLATFORM_APPLE_TV)
+ cout << "This is AppleTV platform!\n";
+#elif defined(PLATFORM_IWATCH)
+ cout << "This is iWatch platform!\n";
+#elif defined(PLATFORM_ANDROID)
+ cout << "This is Android platform!\n";
+#endif
+```
+- Library Test
+```cpp
+#include "include/common.hpp"
+#include
+
+#ifdef USE_BOOST
+#include
+#endif
+
+LibraryTest::LibraryTest()
+{
+
+}
+
+void LibraryTest::testBoost() const noexcept
+{
+ //!Boost Library
+#ifdef USE_BOOST
+ std::cout << "Boost version " << BOOST_VERSION << std::endl;
+ std::cout << "Boost Lib Clock Test\n";
+ boost::chrono::system_clock::time_point start = boost::chrono::system_clock::now();
+ for ( long i = 0; i < 10000000; ++i )
+ std::sqrt( 123.456L ); // burn some time
+ boost::chrono::duration sec = boost::chrono::system_clock::now() - start;
+ std::cout << "took " << sec.count() << " seconds\n";
+#else
+ std::cout << "Boost Library is not available.\n";
+#endif
+
+}
+```
+
+- Language Test
+```cpp
+#ifdef USE_FEATURE_TEST
+ if (print.general_features) show("C++ GENERAL", cxx);
+ if (print.cxx11 && print.core_features) show("C++11 CORE", cxx11);
+ if (print.cxx14 && print.core_features) show("C++14 CORE", cxx14);
+ if (print.cxx14 && print.lib_features ) show("C++14 LIB" , cxx14lib);
+ if (print.cxx17 && print.core_features) show("C++17 CORE", cxx17);
+ if (print.cxx17 && print.lib_features ) show("C++17 LIB" , cxx17lib);
+ if (print.cxx20 && print.core_features) show("C++20 CORE", cxx20);
+ if (print.cxx20 && print.lib_features ) show("C++20 LIB" , cxx20lib);
+ if (print.cxx23 && print.core_features) show("C++23 CORE", cxx23);
+ if (print.cxx23 && print.lib_features ) show("C++23 LIB" , cxx23lib);
+ if (print.attributes) show("ATTRIBUTES", attributes);
+#else
+ std::cout << "Test Feature is not available.\n";
+#endif
+```
+- Config Test
+```cpp
+
+#include "config.hpp"
+#include
+
+ std::cout << "========CONFIG TEST========" << std::endl;
+ std::cout << "Project Name : " << PROJECT_NAME << std::endl;
+ std::cout << "Project Description : " << PROJECT_DESCRIPTION << std::endl;
+ std::cout << "Project Homepage Url : " << PROJECT_HOMEPAGE_URL << std::endl;
+ std::cout << "Project Language : " << PROJECT_LANGUAGES << std::endl;
+ std::cout << "Project Full Version : " << PROJECT_VERSION_STRING << std::endl;
+ std::cout << "Project Creator : " << PROJECT_CREATOR << std::endl;
+ std::cout << "Project License Type : " << PROJECT_LICENSE_TYPE << std::endl;
+ std::cout << "========CONFIG TEST========" << std::endl;
+
+```
+## If you want donate, Bitcoin address is here! <3
+
+
+## TOOD
+- Bug fixing.
+- Add new exception handler.
+- Add new features.
+- Support new libraries.
+- Tell me your opinion about which other items should be added.
+
+## Contribution
+- Bug fixes, docs, and enhancements welcome! Please let me know kambiz.ceo@gmail.com
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000..a128e08
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,46 @@
+# Security Policy
+
+## Reporting Security Issues
+
+The security of this project is of utmost importance. If you discover any security-related issues or vulnerabilities, please report them to our security team by emailing [security@genyleap.com](mailto:security@genyleap.com). Please refrain from publicly disclosing the issue until we have had a chance to address it.
+
+We appreciate your efforts in responsibly disclosing any security concerns and will make every effort to acknowledge your contributions.
+
+## Supported Versions
+
+| Version | Supported |
+| ------- | ------------------ |
+| 1.x.x | :white_check_mark: |
+| 0.x.x | :x: |
+
+## Reporting a Vulnerability
+
+If you believe you've found a vulnerability that has potential security implications, please help us by following these guidelines:
+
+- Provide a detailed description of the vulnerability, including steps to reproduce the issue.
+- Include information about the affected version(s) of the project.
+- If applicable, provide any additional resources or references that may assist in understanding and resolving the vulnerability.
+- If you have a suggested solution or mitigation for the vulnerability, please include it in your report.
+
+We will review and assess the vulnerability report promptly. Depending on the nature of the issue, we may reach out to you to gather more information or provide updates on the status of the vulnerability.
+
+## Security Updates and Patching
+
+We are committed to addressing security issues promptly and providing updates and patches as necessary. After receiving a vulnerability report, our team will work diligently to investigate and address the issue.
+
+We will aim to provide regular updates on the progress of vulnerability resolution and the planned release schedule for patches or new versions.
+
+## Acknowledgments
+
+We greatly appreciate your help in improving the security of this project.
+
+## Responsible Disclosure
+
+We request that you follow responsible disclosure practices by not publicly disclosing any potential vulnerabilities until we have had sufficient time to address them.
+
+Please allow us a reasonable amount of time to investigate and resolve the issue before sharing any details publicly.
+
+## Contact
+
+If you have any questions or concerns regarding the security of this project, please contact our security team at [security@genyleap.com](mailto:security@genyleap.com).
+
diff --git a/cmake/color-message.cmake b/cmake/color-message.cmake
new file mode 100644
index 0000000..087ebf1
--- /dev/null
+++ b/cmake/color-message.cmake
@@ -0,0 +1,55 @@
+# Define color codes for terminal output
+if(NOT WIN32)
+ string(ASCII 27 Esc)
+ set(ColourReset "${Esc}[m")
+ set(Bold "${Esc}[1m")
+ set(Underscore "${Esc}[4m")
+ set(Red "${Esc}[31m")
+ set(Green "${Esc}[32m")
+ set(Yellow "${Esc}[33m")
+ set(Blue "${Esc}[34m")
+ set(Magenta "${Esc}[35m")
+ set(Cyan "${Esc}[36m")
+ set(White "${Esc}[37m")
+ set(BoldRed "${Esc}[1;31m")
+ set(BoldGreen "${Esc}[1;32m")
+ set(BoldYellow "${Esc}[1;33m")
+ set(BoldBlue "${Esc}[1;34m")
+ set(BoldMagenta "${Esc}[1;35m")
+ set(BoldCyan "${Esc}[1;36m")
+ set(BoldWhite "${Esc}[1;37m")
+endif()
+
+# Function to print colored messages to the terminal
+function(ColorMessage)
+ list(GET ARGV 0 MessageType)
+ # Determine the message type and apply the appropriate color
+ if(MessageType STREQUAL FATAL_ERROR OR MessageType STREQUAL SEND_ERROR)
+ list(REMOVE_AT ARGV 0)
+ message(${MessageType} "${BoldRed}>> ${ARGV}${ColourReset}")
+ elseif(MessageType STREQUAL WARNING)
+ list(REMOVE_AT ARGV 0)
+ message(${MessageType} "${BoldYellow}>> ${ARGV}${ColourReset}")
+ elseif(MessageType STREQUAL AUTHOR_WARNING)
+ list(REMOVE_AT ARGV 0)
+ message(${MessageType} "${BoldCyan}>> ${ARGV}${ColourReset}")
+ elseif(MessageType STREQUAL STATUS)
+ list(REMOVE_AT ARGV 0)
+ message(${MessageType} "${Green}>> ${ARGV}${ColourReset}")
+ elseif(MessageType STREQUAL INFO)
+ list(REMOVE_AT ARGV 0)
+ message("-- ${BoldBlue}>> ${ARGV}${ColourReset}")
+ elseif(MessageType STREQUAL NOTICE)
+ list(REMOVE_AT ARGV 0)
+ message("-- ${Blue}>> ${ARGV}${ColourReset}")
+ elseif(MessageType STREQUAL IMPORTANT)
+ list(REMOVE_AT ARGV 0)
+ message("-- ${Yellow}>> ${ARGV}${ColourReset}")
+ elseif(MessageType STREQUAL MORE_IMPORTANT)
+ list(REMOVE_AT ARGV 0)
+ message("-- ${BoldYellow}>> ${ARGV}${ColourReset}")
+ else()
+ # Default message without color
+ message(">> ${ARGV}")
+ endif()
+endfunction()
diff --git a/cmake/compiler-options.cmake b/cmake/compiler-options.cmake
new file mode 100644
index 0000000..41aa4c8
--- /dev/null
+++ b/cmake/compiler-options.cmake
@@ -0,0 +1,326 @@
+include(CheckCXXCompilerFlag)
+
+CHECK_CXX_COMPILER_FLAG("-std=c++26" COMPILER_SUPPORTS_CXX26)
+CHECK_CXX_COMPILER_FLAG("-std=c++23" COMPILER_SUPPORTS_CXX23)
+CHECK_CXX_COMPILER_FLAG("-std=c++20" COMPILER_SUPPORTS_CXX20)
+CHECK_CXX_COMPILER_FLAG("-std=c++17" COMPILER_SUPPORTS_CXX17)
+CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
+CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
+CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
+
+if(COMPILER_SUPPORTS_CXX26)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++26")
+elseif(COMPILER_SUPPORTS_CXX23)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++23")
+elseif(COMPILER_SUPPORTS_CXX23)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")
+elseif(COMPILER_SUPPORTS_CXX20)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
+elseif(COMPILER_SUPPORTS_CXX14)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
+elseif(COMPILER_SUPPORTS_CXX11)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+elseif(COMPILER_SUPPORTS_CXX0X)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+else()
+ message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
+endif()
+
+set(OPTIMIZATION_LEVEL "0" CACHE STRING "Optimization Level")
+if (OPTIMIZATION_LEVEL)
+ add_definitions(-DOPTIMIZATION_LEVEL)
+endif()
+
+# -lstdc++: Links against the GNU Standard C++ Library.
+# -lc++: Links against the libc++ library (used in Clang/LLVM compiler).
+# -lc++abi: Links against the libc++abi library, which provides low-level support for the C++ runtime (used in Clang/LLVM compiler).
+# Note: Both GCC and MSVC, you generally don't need to explicitly include flags like -lc++abi or their equivalents.
+
+# C++ STL Library Features.
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ set(CMAKE_CXX_STANDARD_LIBRARIES "-lstdc++")
+endif()
+
+# Multi-threaded DLL runtime library (/MD or /MDd)
+if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MD")
+endif()
+
+if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ set(CMAKE_CXX_STANDARD_LIBRARIES "-lc++ -lc++abi")
+endif()
+
+
+if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ message("-- CMake run for msvc")
+ if(OPTIMIZATION_LEVEL EQUAL "0")
+ set(CMAKE_CXX_FLAGS_DEBUG "/Z7 /Od")
+ set(CMAKE_CXX_FLAGS_RELEASE "/Od")
+ endif()
+ if(OPTIMIZATION_LEVEL EQUAL "1")
+ set(CMAKE_CXX_FLAGS_DEBUG "/Zi /O1")
+ set(CMAKE_CXX_FLAGS_RELEASE "/O1")
+ endif()
+ if(OPTIMIZATION_LEVEL EQUAL "2")
+ set(CMAKE_CXX_FLAGS_DEBUG "/Zi /O2")
+ set(CMAKE_CXX_FLAGS_RELEASE "/O2")
+ endif()
+ if(OPTIMIZATION_LEVEL EQUAL "3")
+ set(CMAKE_CXX_FLAGS_DEBUG "-ZI -Oi")
+ set(CMAKE_CXX_FLAGS_RELEASE "-Oi")
+ endif()
+ if(OPTIMIZATION_LEVEL EQUAL "4")
+ set(CMAKE_CXX_FLAGS_DEBUG "-ZI /Os")
+ set(CMAKE_CXX_FLAGS_RELEASE "/Os")
+ endif()
+ if(OPTIMIZATION_LEVEL EQUAL "5")
+ set(CMAKE_CXX_FLAGS_DEBUG "-ZI /Ot")
+ set(CMAKE_CXX_FLAGS_RELEASE "/Ot")
+ endif()
+else()
+ message("-- CMake run for GNU")
+ if(OPTIMIZATION_LEVEL EQUAL "0")
+ set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
+ set(CMAKE_CXX_FLAGS_RELEASE "-O0")
+ endif()
+ if(OPTIMIZATION_LEVEL EQUAL "1")
+ set(CMAKE_CXX_FLAGS_DEBUG "-g -O1")
+ set(CMAKE_CXX_FLAGS_RELEASE "-O1")
+ endif()
+ if(OPTIMIZATION_LEVEL EQUAL "2")
+ set(CMAKE_CXX_FLAGS_DEBUG "-g -O2")
+ set(CMAKE_CXX_FLAGS_RELEASE "-O2")
+ endif()
+ if(OPTIMIZATION_LEVEL EQUAL "3")
+ set(CMAKE_CXX_FLAGS_DEBUG "-g -O3")
+ set(CMAKE_CXX_FLAGS_RELEASE "-O3")
+ endif()
+ if(OPTIMIZATION_LEVEL EQUAL "4")
+ set(CMAKE_CXX_FLAGS_DEBUG "-g -Os")
+ set(CMAKE_CXX_FLAGS_RELEASE "-Os")
+ endif()
+ if(OPTIMIZATION_LEVEL EQUAL "5")
+ set(CMAKE_CXX_FLAGS_DEBUG "-g -Ofast")
+ set(CMAKE_CXX_FLAGS_RELEASE "-Ofast")
+ endif()
+endif()
+
+# Enable optional features
+option(ENABLE_MODULES "Enable C++20 modules" OFF)
+if(ENABLE_MODULES)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmodules")
+ add_definitions(-DENABLE_MODULES)
+endif()
+
+# Debug/Testing Modes
+option(ENABLE_DEBUG_LOGGING "Enable debug logging" OFF)
+option(ENABLE_TESTING "Enable testing mode" OFF)
+if(ENABLE_DEBUG_LOGGING)
+ add_definitions(-DDEBUG_LOGGING)
+endif()
+if(ENABLE_TESTING)
+ add_definitions(-DENABLE_TESTING)
+endif()
+
+#########################
+# --- Build Options --- #
+#########################
+
+# Use Feature Test library
+option(USE_FEATURE_TEST "Use Feature Test library" OFF)
+if (USE_FEATURE_TEST)
+ add_definitions(-DUSE_FEATURE_TEST)
+endif()
+
+# Use Https/SSL system
+option(USE_SSL_METHOD "Use Https/SSL system" OFF)
+if (USE_SSL_METHOD)
+ add_definitions(-DUSE_SSL_METHOD)
+endif()
+
+# Use test mode
+option(ENABLE_TESTING "Use test mode" OFF)
+if (ENABLE_TESTING)
+ add_definitions(-DENABLE_TESTING)
+endif()
+
+# Enable the test of clang-tidy
+option(ENABLE_CLANG_TIDY "Enabling the test of clang-tidy" OFF)
+if (ENABLE_CLANG_TIDY)
+ add_definitions(-DENABLE_CLANG_TIDY)
+endif()
+
+# Enable the test of cppcheck
+option(ENABLE_CPPCHECK "Enabling the test of cppcheck" OFF)
+if (ENABLE_CPPCHECK)
+ add_definitions(-DENABLE_CPPCHECK)
+endif()
+
+# Build the project as minimally as possible
+option(SIMPLE_BUILD "Build the project as minimally as possible" OFF)
+if (SIMPLE_BUILD)
+ add_definitions(-DSIMPLE_BUILD)
+endif()
+
+# Build the project's documentation
+option(BUILD_DOC "Build the project's documentation" OFF)
+if (BUILD_DOC)
+ add_definitions(-DBUILD_DOC)
+endif()
+
+# Compile Qt Quick (QML) files
+option(USE_QT_QUICK_COMPILER "Compile Qt Quick (QML) files." OFF)
+if (USE_QT_QUICK_COMPILER)
+ add_definitions(-DUSE_QT_QUICK_COMPILER)
+endif()
+
+# Developer Mode
+option(ENABLE_DEVELOPER_MODE "Developer Mode" ON)
+if (ENABLE_DEVELOPER_MODE)
+ add_definitions(-DENABLE_DEVELOPER_MODE)
+endif()
+
+# Todo Mode (Not activated feature!)
+option(ENABLE_TODO_MODE "Todo Mode (Not activated feature!)" ON)
+if (ENABLE_TODO_MODE)
+ add_definitions(-DENABLE_TODO_MODE)
+endif()
+
+# Experimental Mode
+option(ENABLE_EXPERIMENTAL_MODE "Experimental Mode" ON)
+if (ENABLE_EXPERIMENTAL_MODE)
+ add_definitions(-DENABLE_EXPERIMENTAL_MODE)
+endif()
+
+# Always produce ANSI-colored output (GNU/Clang only).
+option(FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." TRUE)
+if (FORCE_COLORED_OUTPUT)
+ add_definitions(-DFORCE_COLORED_OUTPUT)
+endif()
+
+# Enable safe codes only!
+option(ENABLE_SAFE_ONLY "Enable safe codes only!" OFF)
+if (ENABLE_SAFE_ONLY)
+ add_definitions(-DENABLE_SAFE_ONLY)
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ SET (CMAKE_CXX_FLAGS "/Wall /WX")
+ else()
+ SET (CMAKE_CXX_FLAGS "-Wall -Wextra -Werror")
+ endif()
+endif()
+
+# Enable full warnings for the compiler!
+option(ENABLE_WARN_MODE "Enable full warnings for compiler!" OFF)
+if (ENABLE_WARN_MODE)
+ add_definitions(-DENABLE_WARN_MODE)
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ SET (CMAKE_CXX_FLAGS "/Wall")
+ else()
+ SET (CMAKE_CXX_FLAGS "-Wall")
+ endif()
+endif()
+
+# Enable developer (debug) mode
+option(BUILD_DEBUG_MODE "Enable developer (debug) mode" ON)
+if (BUILD_DEBUG_MODE)
+ add_definitions(-DBUILD_DEBUG_MODE)
+endif()
+
+# Enabling the build of debug logging
+option(DEBUG_LOGGING "Enabling the build of debug logging" OFF)
+if (DEBUG_LOGGING)
+ add_definitions(-DDEBUG_LOGGING)
+endif()
+
+# Build Static Version
+option(ENABLE_STATIC_LIB_BUILD "Build Static Version" OFF)
+if (ENABLE_STATIC_LIB_BUILD)
+ add_definitions(-DENABLE_STATIC_LIB_BUILD)
+endif()
+
+# Build Shared Version
+option(ENABLE_SHARED_LIB_BUILD "Build Shared Version" OFF)
+if (ENABLE_SHARED_LIB_BUILD)
+ add_definitions(-DENABLE_SHARED_LIB_BUILD)
+endif()
+
+# Build Executable Version
+option(ENABLE_BINARY_BUILD "Build Executable Version" ON)
+if (ENABLE_BINARY_BUILD)
+ add_definitions(-DENABLE_BINARY_BUILD)
+endif()
+
+# Header Only Version
+option(ENABLE_HEADER_ONLY_BUILD "Header Only Version" OFF)
+if (ENABLE_HEADER_ONLY_BUILD)
+ add_definitions(-DENABLE_HEADER_ONLY_BUILD)
+endif()
+
+# Forcing to enable updated programming language.
+option(FORCE_LATEST_STANDARD_FEATURE "Forcing to enable updated programming language." OFF)
+if (FORCE_LATEST_STANDARD_FEATURE)
+ add_definitions(-DFORCE_LATEST_STANDARD_FEATURE)
+endif()
+
+# Sanitizers Options
+option(ENABLE_SANITIZERS "Enable Sanitizers" OFF)
+option(ENABLE_ADDRESS_SANITIZER "Enable AddressSanitizer (ASan)" OFF)
+option(ENABLE_LEAK_SANITIZER "Enable LeakSanitizer (LSan)" OFF)
+option(ENABLE_MEMORY_SANITIZER "Enable MemorySanitizer" OFF)
+option(ENABLE_THREAD_SANITIZER "Enable ThreadSanitizer" OFF)
+option(ENABLE_UNDEFINED_SANITIZER "Enable UndefinedBehaviorSanitizer" OFF)
+
+if (ENABLE_SANITIZERS)
+ add_definitions(-DENABLE_SANITIZERS)
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ if (APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address,undefined")
+ else()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address,leak,undefined")
+ endif()
+ if (ENABLE_MEMORY_SANITIZER AND NOT APPLE)
+ add_definitions(-DENABLE_MEMORY_SANITIZER)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=memory")
+ endif()
+ if (ENABLE_THREAD_SANITIZER)
+ add_definitions(-DENABLE_THREAD_SANITIZER)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread")
+ endif()
+ if (ENABLE_UNDEFINED_SANITIZER)
+ add_definitions(-DENABLE_UNDEFINED_SANITIZER)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
+ endif()
+ if (APPLE)
+ message(STATUS "Sanitizers are based on Clang on macOS.")
+ endif()
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND NOT APPLE)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address,leak,undefined")
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND APPLE)
+ message(WARNING "Sanitizer is not supported with GCC on macOS. Ignoring the options.")
+ else()
+ message(WARNING "Unsupported compiler. Sanitizers are disabled.")
+ endif()
+else()
+ # Check and enable individual sanitizers
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ foreach(SANITIZER IN ITEMS ADDRESS LEAK MEMORY THREAD UNDEFINED)
+ if ("ENABLE_${SANITIZER}_SANITIZER")
+ add_definitions(-DENABLE_${SANITIZER}_SANITIZER)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${SANITIZER}")
+ endif()
+ endforeach()
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND NOT APPLE)
+ foreach(SANITIZER IN ITEMS ADDRESS LEAK MEMORY THREAD UNDEFINED)
+ if ("ENABLE_${SANITIZER}_SANITIZER")
+ add_definitions(-DENABLE_${SANITIZER}_SANITIZER)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${SANITIZER}")
+ endif()
+ endforeach()
+ else()
+ message(WARNING "Unsupported compiler. Sanitizers are disabled.")
+ endif()
+endif()
+
+
+# Summary
+message(STATUS "Final compiler flags: ${CMAKE_CXX_FLAGS}")
diff --git a/cmake/cross-compile.cmake b/cmake/cross-compile.cmake
new file mode 100644
index 0000000..7dc0c88
--- /dev/null
+++ b/cmake/cross-compile.cmake
@@ -0,0 +1,100 @@
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/platforms-toolchain/")
+
+# ------ CROSS-COMPILE CONFIG ------
+if (EXISTS "${CMAKE_CXX_COMPILER}")
+ execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
+ OUTPUT_VARIABLE EMCC_VERSION
+ ERROR_VARIABLE EMCC_VERSION)
+ if (EMCC_VERSION MATCHES "Emscripten")
+ message(STATUS "Ready for Wasm...")
+ set(WASM TRUE)
+ set(PLATFORM_OS "Web")
+ set(OS_ARCHITECTURES ${CMAKE_SYSTEM_PROCESSOR})
+ include(wasm-toolchain)
+ if(wasm-toolchain)
+ return()
+ endif()
+ set(wasm-toolchain ON)
+ endif()
+endif()
+
+#LINUX
+if(LINUX AND NOT ANDROID AND NOT APPLE)
+ message(STATUS "Ready for LINUX.")
+ set(LINUX TRUE)
+ set(PLATFORM_OS "Linux")
+ set(OS_ARCHITECTURES ${CMAKE_SYSTEM_PROCESSOR})
+include(linux-toolchain)
+set(linux-toolchain ON)
+if(linux-toolchain)
+ return()
+endif()
+endif()
+
+#ANDROID
+if(ANDROID AND NOT APPLE)
+ message(STATUS "Ready for Android.")
+ set(ANDROID TRUE)
+ set(PLATFORM_OS "Android")
+ set(OS_ARCHITECTURES ${CMAKE_SYSTEM_PROCESSOR})
+include(android-toolchain)
+if(android-toolchain)
+ return()
+endif()
+set(android-toolchain ON)
+endif()
+
+#APPLE SILICON
+if(UNIX AND NOT ANDROID AND NOT LINUX AND APPLE)
+ message(STATUS "Ready for Apple Silicon.")
+ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ message(STATUS "Ready for macOS.")
+ set(MACOSX TRUE)
+ set(PLATFORM_OS "macOS")
+ set(OS_ARCHITECTURES ${CMAKE_SYSTEM_PROCESSOR})
+ include(macos-toolchain)
+ if(macos-toolchain)
+ return()
+ endif()
+ set(macos-toolchain ON)
+ endif()
+endif()
+
+#iOS
+if(UNIX AND NOT ANDROID AND NOT LINUX AND APPLE)
+ if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
+ message(STATUS "Ready for iOS.")
+ set(PLATFORM_OS "iOS")
+ set(OS_ARCHITECTURES ${CMAKE_OSX_ARCHITECTURES})
+ include(ios-toolchain)
+ if(ios-toolchain)
+ return()
+ endif()
+ set(ios-toolchain ON)
+ endif()
+endif()
+
+#FREEBSD
+if(UNIX AND NOT ANDROID AND NOT LINUX AND NOT APPLE AND NOT WASM)
+ message(STATUS "Ready for Unix, BSDs...")
+ set(UNIX TRUE)
+ set(PLATFORM_OS "Unix")
+ set(OS_ARCHITECTURES ${CMAKE_SYSTEM_PROCESSOR})
+ include(unix-toolchain)
+ if(unix-toolchain)
+ return()
+ endif()
+ set(unix-toolchain ON)
+endif()
+
+#Windows
+if(WIN32)
+ set(WINDOWS TRUE)
+ message(STATUS "Ready for Windows.")
+ include(windows-toolchain)
+ if(windows-toolchain)
+ return()
+ endif()
+ set(windows-toolchain ON)
+endif()
diff --git a/cmake/packages.cmake b/cmake/packages.cmake
new file mode 100644
index 0000000..f6e1727
--- /dev/null
+++ b/cmake/packages.cmake
@@ -0,0 +1,29 @@
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/packages")
+
+set(THIRD_PARTY "third-party" CACHE STRING "3rdparty folder for project dependencies. [Don't change this variable.]")
+
+find_package(Git)
+if(Git_FOUND)
+ message("Git found: ${GIT_EXECUTABLE}")
+endif()
+
+find_package(Boost REQUIRED)
+find_package(OpenSSL REQUIRED)
+find_package(Cryptopp REQUIRED)
+find_package(OpenCV REQUIRED)
+find_package(OpenMesh REQUIRED)
+find_package(GTest REQUIRED)
+find_package(DocTest REQUIRED)
+find_package(Catch2 REQUIRED)
+find_package(Curl REQUIRED)
+find_package(Fmt REQUIRED)
+find_package(Jwt REQUIRED)
+find_package(JSon REQUIRED)
+find_package(Ctre REQUIRED)
+find_package(Zlib REQUIRED)
+find_package(Eigen REQUIRED)
+
+if (USE_CUSTOM_ENGINE)
+ find_package(${ENGINE_CODE_NAME} REQUIRED)
+endif()
diff --git a/cmake/packages/FindBoost.cmake b/cmake/packages/FindBoost.cmake
new file mode 100644
index 0000000..fd502a6
--- /dev/null
+++ b/cmake/packages/FindBoost.cmake
@@ -0,0 +1,48 @@
+# Package Info.
+set(BOOST_NAME "Boost")
+set(BOOST_DESCRIPTION "The Boost project provides free peer-reviewed portable C++ source libraries.")
+# Pakcage option.
+option(USE_BOOST ${BOOST_DESCRIPTION} FALSE)
+if (USE_BOOST)
+ add_definitions(-DUSE_BOOST)
+ # Define the repository URL and tag for the Boost libraries
+ set(BOOST_URL "https://github.com/boostorg/boost.git")
+if(FORCE_UPGRADED_LIBS)
+ set(BOOST_TAG "master")
+else()
+ set(BOOST_TAG "boost-1.82.0")
+endif()
+ set(BOOST_LIB_LIST "Boost::system;Boost::chrono;Boost::filesystem;Boost::json" CACHE STRING "List of modules (separated by a semicolon)")
+endif()
+
+find_package(PkgConfig QUIET)
+pkg_search_module(Boost boost)
+# Package data repository.
+if(USE_BOOST)
+ set(FETCHCONTENT_QUIET off)
+ get_filename_component(boost_base "${CMAKE_CURRENT_SOURCE_DIR}/${THIRD_PARTY}/${BOOST_NAME}"
+ REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+ set(FETCHCONTENT_BASE_DIR ${boost_base})
+ # Declare the Boost libraries with their submodules using FetchContent_Declare
+ FetchContent_Declare(
+ boost
+ GIT_REPOSITORY ${BOOST_URL}
+ GIT_TAG ${BOOST_TAG}
+ GIT_PROGRESS TRUE
+ USES_TERMINAL_DOWNLOAD TRUE
+ )
+ # Check if population has already been performed
+ FetchContent_GetProperties(boost)
+ string(TOLOWER "${BOOST_NAME}" lcName)
+ if(NOT ${lcName}_POPULATED)
+ FetchContent_Populate(${lcName})
+ add_subdirectory(${${lcName}_SOURCE_DIR} ${${lcName}_BINARY_DIR} EXCLUDE_FROM_ALL)
+ endif()
+ FetchContent_MakeAvailable(boost)
+ foreach(module IN LISTS BOOST_LIB_LIST)
+ list(APPEND LIB_MODULES ${module})
+ endforeach()
+endif()
+if(NOT BOOST_FOUND)
+ return()
+endif()
diff --git a/cmake/packages/FindCatch2.cmake b/cmake/packages/FindCatch2.cmake
new file mode 100644
index 0000000..c9d5f53
--- /dev/null
+++ b/cmake/packages/FindCatch2.cmake
@@ -0,0 +1,50 @@
+# Package Info.
+set(CATCH2_NAME "Catch2")
+set(CATCH2_DESCRIPTION "A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch).")
+
+# Pakcage option.
+option(USE_CATCH2 ${CATCH2_DESCRIPTION} FALSE)
+if (USE_CATCH2)
+ add_definitions(-DUSE_CATCH2)
+ # Define the repository URL and tag for the Catch2 libraries
+ set(CATCH2_URL "https://github.com/catchorg/Catch2.git")
+if(FORCE_UPGRADED_LIBS)
+ set(CATCH2_TAG "master")
+else()
+ set(CATCH2_TAG "v3.3.2")
+endif()
+ set(CATCH2_LIB_LIST "Catch2" CACHE STRING "List of modules (separated by a semicolon)")
+endif()
+
+find_package(PkgConfig QUIET)
+pkg_search_module(Catch2 catch2)
+# Package data repository.
+if(USE_CATCH2)
+ set(FETCHCONTENT_QUIET off)
+ get_filename_component(catch2_base "${CMAKE_CURRENT_SOURCE_DIR}/${THIRD_PARTY}/catch2"
+ REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+ set(FETCHCONTENT_BASE_DIR ${catch2_base})
+ FetchContent_Declare(
+ catch2
+ GIT_REPOSITORY ${CATCH2_URL}
+ GIT_TAG ${CATCH2_TAG}
+ GIT_PROGRESS TRUE
+ USES_TERMINAL_DOWNLOAD TRUE
+ )
+
+ # Check if population has already been performed
+ FetchContent_GetProperties(catch2)
+ string(TOLOWER "catch2" lcName)
+ if(NOT ${lcName}_POPULATED)
+ FetchContent_Populate(${lcName})
+ add_subdirectory(${${lcName}_SOURCE_DIR} ${${lcName}_BINARY_DIR} EXCLUDE_FROM_ALL)
+ endif()
+ FetchContent_MakeAvailable(catch2)
+ foreach(module IN LISTS CATCH2_LIB_LIST)
+ list(APPEND LIB_MODULES ${module})
+ endforeach()
+endif()
+if(NOT CATCH2_FOUND)
+ return()
+endif()
+
diff --git a/cmake/packages/FindCell.cmake b/cmake/packages/FindCell.cmake
new file mode 100644
index 0000000..7a3e7d6
--- /dev/null
+++ b/cmake/packages/FindCell.cmake
@@ -0,0 +1,34 @@
+#Package Info.
+set(ENGINE_NAME "Cell")
+set(ENGINE_DESCRIPTION "Cell Engine is a new and exclusive cross-platform computer application engine based on Modern C++.")
+
+message("Preparing for " ${ENGINE_NAME} "Engine")
+
+find_package(PkgConfig QUIET)
+pkg_search_module(${ENGINE_NAME} cell)
+#Package data repository.
+
+ set(FETCHCONTENT_QUIET off)
+ get_filename_component(cell_base "${CMAKE_CURRENT_SOURCE_DIR}/${THIRD_PARTY}/${PLATFORM_FOLDER_NAME}/${ENGINE_NAME}"
+ REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+ set(FETCHCONTENT_BASE_DIR ${cell_base})
+ FetchContent_Declare(
+ cell
+ GIT_REPOSITORY https://github.com/genyleap/cell.git
+ GIT_TAG main
+ GIT_PROGRESS TRUE
+ )
+ # Check if population has already been performed
+ FetchContent_GetProperties(cell)
+ string(TOLOWER "${ENGINE_NAME}" lcName)
+ if(NOT ${lcName}_POPULATED)
+ FetchContent_Populate(${lcName})
+ add_subdirectory(${${lcName}_SOURCE_DIR} ${${lcName}_BINARY_DIR} EXCLUDE_FROM_ALL)
+ endif()
+ FetchContent_MakeAvailable(cell)
+ include_directories(${${lcName}_INCLUDE_DIR})
+ list(APPEND LIB_MODULES cell_lib)
+
+if(NOT CELL_FOUND)
+ return()
+endif()
diff --git a/cmake/packages/FindCppCheck.cmake b/cmake/packages/FindCppCheck.cmake
new file mode 100644
index 0000000..f3d5a4a
--- /dev/null
+++ b/cmake/packages/FindCppCheck.cmake
@@ -0,0 +1,23 @@
+#Package Info.
+set(CPPCHECK_NAME "CppCheck")
+set(CPPCHECK_DESCRIPTION "Static analysis of C/C++ code.")
+
+#Pakcage option.
+option(USE_CPP_CHECK ${CPPCHECK_DESCRIPTION} FALSE)
+if (USE_CPP_CHECK)
+ add_definitions(-DUSE_CPP_CHECK)
+endif()
+
+if(USE_CPP_CHECK)
+ externalproject_add(${CPPCHECK_NAME}
+ GIT_REPOSITORY "https://github.com/danmar/cppcheck.git"
+ GIT_TAG main
+ INSTALL_DIR "${CMAKE_BINARY_DIR}/install/${CPPCHECK_NAME}"
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_SOURCE_DIR}/${THIRD_PARTY}/${CPPCHECK_NAME}
+ CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_SOURCE_DIR}/${THIRD_PARTY}/${CPPCHECK_NAME}
+ UPDATE_COMMAND ""
+ )
+endif()
+if(NOT CPPCHECK_FOUND)
+ return()
+endif()
diff --git a/cmake/packages/FindCryptopp.cmake b/cmake/packages/FindCryptopp.cmake
new file mode 100644
index 0000000..4ada83c
--- /dev/null
+++ b/cmake/packages/FindCryptopp.cmake
@@ -0,0 +1,45 @@
+# Package Info.
+set(CRYPTOPP_NAME "Cryptopp")
+set(CRYPTOPP_DESCRIPTION "free C++ class library of cryptographic schemes")
+
+# Pakcage option.
+option(USE_CRYPTOPP ${CRYPTOPP_DESCRIPTION} FALSE)
+if (USE_CRYPTOPP)
+ add_definitions(-DUSE_CRYPTOPP)
+ # Define the repository URL and tag for the CRYPTOPP libraries
+ set(CRYPTOPP_URL "https://github.com/weidai11/cryptopp.git")
+if(FORCE_UPGRADED_LIBS)
+ set(CRYPTOPP_TAG "master")
+else()
+ set(CRYPTOPP_TAG "CRYPTOPP_8_7_0")
+endif()
+ set(CRYPTOPP_LIB_LIST "cryptopp" CACHE STRING "List of modules (separated by a semicolon)")
+endif()
+
+if(USE_CRYPTOPP)
+ set(FETCHCONTENT_QUIET off)
+ get_filename_component(cryptopp_base "${CMAKE_CURRENT_SOURCE_DIR}/${THIRD_PARTY}/${PLATFORM_FOLDER_NAME}/${CRYPTOPP_NAME}"
+ REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+ set(FETCHCONTENT_BASE_DIR ${cryptopp_base})
+ FetchContent_Declare(
+ cryptopp
+ GIT_REPOSITORY ${CRYPTOPP_URL}
+ GIT_TAG ${CRYPTOPP_TAG}
+ GIT_PROGRESS TRUE
+ )
+ # Check if population has already been performed
+ FetchContent_GetProperties(cryptopp)
+ string(TOLOWER "${CRYPTOPP_NAME}" lcName)
+ if(NOT ${lcName}_POPULATED)
+ FetchContent_Populate(${lcName})
+ add_library(${lcName} STATIC ${${lcName}_SOURCE_DIR}/cryptlib.cpp)
+ endif()
+ FetchContent_MakeAvailable(cryptopp)
+ include_directories(${${lcName}_SOURCE_DIR})
+ foreach(module IN LISTS CRYPTOPP_LIB_LIST)
+ list(APPEND LIB_MODULES ${module})
+ endforeach()
+endif()
+if(NOT CRYPTOPP_FOUND)
+ return()
+endif()
diff --git a/cmake/packages/FindCtre.cmake b/cmake/packages/FindCtre.cmake
new file mode 100644
index 0000000..4399ccd
--- /dev/null
+++ b/cmake/packages/FindCtre.cmake
@@ -0,0 +1,47 @@
+# Package Info.
+set(CTRE_NAME "Ctre")
+set(CTRE_DESCRIPTION "A Compile time PCRE (almost) compatible regular expression matcher.")
+
+# Pakcage option.
+option(USE_CTRE ${CTRE_DESCRIPTION} FALSE)
+if (USE_CTRE)
+ add_definitions(-DUSE_CTRE)
+ # Define the repository URL and tag for the Ctre libraries
+ set(CTRE_URL "https://github.com/hanickadot/compile-time-regular-expressions.git")
+if(FORCE_UPGRADED_LIBS)
+ set(CTRE_TAG "main")
+else()
+ set(CTRE_TAG "v3.7.2")
+endif()
+ set(CTRE_LIB_LIST "ctre" CACHE STRING "List of modules (separated by a semicolon)")
+endif()
+
+find_package(PkgConfig QUIET)
+pkg_search_module(${DOCTEST_NAME} ctre)
+# Package data repository.
+if(USE_CTRE_NAME)
+ set(FETCHCONTENT_QUIET off)
+ get_filename_component(ctre_base "${CMAKE_CURRENT_SOURCE_DIR}/${THIRD_PARTY}/${PLATFORM_FOLDER_NAME}/${CTRE_NAME}"
+ REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+ set(FETCHCONTENT_BASE_DIR ${ctre_base})
+ FetchContent_Declare(
+ ctre
+ GIT_REPOSITORY ${CTRE_URL}
+ GIT_TAG ${CTRE_TAG}
+ GIT_PROGRESS TRUE
+ )
+ # Check if population has already been performed
+ FetchContent_GetProperties(ctre)
+ string(TOLOWER "ctre" lcName)
+ if(NOT ${lcName}_POPULATED)
+ FetchContent_Populate(${lcName})
+ add_subdirectory(${${lcName}_SOURCE_DIR} ${${lcName}_BINARY_DIR} EXCLUDE_FROM_ALL)
+ endif()
+ FetchContent_MakeAvailable(ctre)
+ foreach(module IN LISTS CTRE_LIB_LIST)
+ list(APPEND LIB_MODULES ${module})
+ endforeach()
+endif()
+if(NOT CTRE_FOUND)
+ return()
+endif()
diff --git a/cmake/packages/FindCurl.cmake b/cmake/packages/FindCurl.cmake
new file mode 100644
index 0000000..c20208a
--- /dev/null
+++ b/cmake/packages/FindCurl.cmake
@@ -0,0 +1,29 @@
+# Package Info.
+set(CURL_NAME "Curl")
+set(CURL_DESCRIPTION "A command-line tool used to transfer data from or to a server using various protocols such as HTTP, FTP, SMTP, etc. It is widely used in the development of web applications to test APIs or interact with web servers.")
+
+# Pakcage option.
+option(USE_CURL ${CURL_DESCRIPTION} FALSE)
+if (USE_CURL)
+ add_definitions(-DUSE_CURL)
+endif()
+
+if(USE_CURL)
+ # Search Curl
+ find_package(PkgConfig REQUIRED)
+ pkg_search_module(OPENSSL REQUIRED openssl)
+
+ if(CURL_FOUND)
+ message(STATUS "Using Curl ${CURL_VERSION}")
+ else()
+ # Error; with REQUIRED, pkg_search_module() will throw an error by it's own
+ endif()
+ list(APPEND LIB_MODULES curl)
+ list(APPEND LIB_TARGET_INCLUDE_DIRECTORIES ${CURL_INCLUDE_DIRS})
+ list(APPEND LIB_TARGET_LIBRARY_DIRECTORIES ${CURL_LIBRARY_DIRS})
+ list(APPEND LIB_TARGET_LINK_DIRECTORIES ${CURL_LIBRARY_DIRS})
+ list(APPEND LIB_TARGET_COMPILER_DEFINATION "")
+endif()
+if(NOT CURL_FOUND)
+ return()
+endif()
diff --git a/cmake/packages/FindDocTest.cmake b/cmake/packages/FindDocTest.cmake
new file mode 100644
index 0000000..0aa9bb7
--- /dev/null
+++ b/cmake/packages/FindDocTest.cmake
@@ -0,0 +1,47 @@
+#Package Info.
+set(DOCTEST_NAME "DocTest")
+set(DOCTEST_DESCRIPTION "The fastest feature-rich C++11/14/17/20 single-header testing framework.")
+
+#Pakcage option.
+option(USE_DOC_TEST ${DOCTEST_DESCRIPTION} FALSE)
+if (USE_DOC_TEST)
+ add_definitions(-DUSE_DOC_TEST)
+ # Define the repository URL and tag for the DocTest libraries
+ set(DOC_TEST_URL "https://github.com/onqtam/doctest")
+if(FORCE_UPGRADED_LIBS)
+ set(DOC_TEST_TAG "master")
+else()
+ set(DOC_TEST_TAG "v2.4.11")
+endif()
+ set(DOC_TEST_LIB_LIST "doctest" CACHE STRING "List of modules (separated by a semicolon)")
+endif()
+
+find_package(PkgConfig QUIET)
+pkg_search_module(${DOCTEST_NAME} doctest)
+#Package data repository.
+if(USE_DOC_TEST)
+ set(FETCHCONTENT_QUIET off)
+ get_filename_component(doctest_base "${CMAKE_CURRENT_SOURCE_DIR}/${THIRD_PARTY}/doctest" REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+ set(FETCHCONTENT_BASE_DIR ${doctest_base})
+ FetchContent_Declare(
+ DocTest
+ GIT_REPOSITORY ${DOC_TEST_URL}
+ GIT_TAG ${DOC_TEST_TAG}
+ GIT_PROGRESS TRUE
+ USES_TERMINAL_DOWNLOAD TRUE
+ )
+ # Check if population has already been performed
+ FetchContent_GetProperties(doctest)
+ string(TOLOWER "doctest" lcName)
+ if(NOT ${lcName}_POPULATED)
+ FetchContent_Populate(${lcName})
+ add_subdirectory(${${lcName}_SOURCE_DIR} ${${lcName}_BINARY_DIR} EXCLUDE_FROM_ALL)
+ endif()
+ FetchContent_MakeAvailable(DocTest)
+ foreach(module IN LISTS DOC_TEST_LIB_LIST)
+ list(APPEND LIB_MODULES ${module})
+ endforeach()
+endif()
+if(NOT DOCTEST_FOUND)
+ return()
+endif()
diff --git a/cmake/packages/FindEigen.cmake b/cmake/packages/FindEigen.cmake
new file mode 100644
index 0000000..1758846
--- /dev/null
+++ b/cmake/packages/FindEigen.cmake
@@ -0,0 +1,49 @@
+# Package Info.
+set(EIGEN_NAME "Eigen")
+set(EIGEN_DESCRIPTION "Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.")
+
+# Pakcage option.
+option(USE_EIGEN ${EIGEN_DESCRIPTION} FALSE)
+if (USE_EIGEN)
+ add_definitions(-DUSE_EIGEN)
+ # Define the repository URL and tag for the Eigen libraries
+ set(EIGEN_URL "https://gitlab.com/libeigen/eigen.git")
+if(FORCE_UPGRADED_LIBS)
+ set(EIGEN_TAG "master")
+else()
+ set(EIGEN_TAG "3.4")
+endif()
+ set(EIGEN_LIB_LIST "eigen" CACHE STRING "List of modules (separated by a semicolon)")
+endif()
+
+find_package(PkgConfig QUIET)
+pkg_search_module(${EIGEN_NAME} eigen)
+# Package data repository.
+if(USE_EIGEN)
+ set(FETCHCONTENT_QUIET off)
+ get_filename_component(eigen_base "${CMAKE_CURRENT_SOURCE_DIR}/${THIRD_PARTY}/${EIGEN_NAME}"
+ REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+ set(FETCHCONTENT_BASE_DIR ${eigen_base})
+ FetchContent_Declare(
+ eigen
+ GIT_REPOSITORY ${EIGEN_URL}
+ GIT_TAG ${EIGEN_TAG}
+ GIT_PROGRESS TRUE
+ USES_TERMINAL_DOWNLOAD TRUE
+ )
+
+ # Check if population has already been performed
+ FetchContent_GetProperties(eigen)
+ string(TOLOWER "${EIGEN_NAME}" lcName)
+ if(NOT ${lcName}_POPULATED)
+ FetchContent_Populate(${lcName})
+ add_subdirectory(${${lcName}_SOURCE_DIR} ${${lcName}_BINARY_DIR} EXCLUDE_FROM_ALL)
+ endif()
+ FetchContent_MakeAvailable(eigen)
+ foreach(module IN LISTS EIGEN_LIB_LIST)
+ list(APPEND LIB_MODULES ${module})
+ endforeach()
+endif()
+if(NOT EIGEN_FOUND)
+ return()
+endif()
diff --git a/cmake/packages/FindFmt.cmake b/cmake/packages/FindFmt.cmake
new file mode 100644
index 0000000..c04b744
--- /dev/null
+++ b/cmake/packages/FindFmt.cmake
@@ -0,0 +1,44 @@
+# Package Info.
+set(FMT_NAME "Fmt")
+set(FMT_DESCRIPTION "A modern formatting library.")
+
+# Pakcage option.
+option(USE_FMT ${FMT_DESCRIPTION} FALSE)
+if (USE_FMT)
+ add_definitions(-DUSE_FMT)
+ # Define the repository URL and tag for the Fmt libraries
+ set(FMT_URL "https://github.com/fmtlib/fmt.git")
+if(FORCE_UPGRADED_LIBS)
+ set(FMT_TAG "master")
+else()
+ set(FMT_TAG "9.1.0")
+endif()
+ set(FMT_LIB_LIST "fmt::fmt-header-only" CACHE STRING "List of modules (separated by a semicolon)")
+endif()
+
+if(USE_FMT)
+ set(FETCHCONTENT_QUIET off)
+ get_filename_component(fmt_base "${CMAKE_CURRENT_SOURCE_DIR}/${THIRD_PARTY}/${PLATFORM_FOLDER_NAME}/${FMT_NAME}"
+ REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+ set(FETCHCONTENT_BASE_DIR ${fmt_base})
+ FetchContent_Declare(
+ fmt
+ GIT_REPOSITORY ${FMT_URL}
+ GIT_TAG ${FMT_TAG}
+ GIT_PROGRESS TRUE
+ )
+ # Check if population has already been performed
+ FetchContent_GetProperties(fmt)
+ string(TOLOWER "${FMT_NAME}" lcName)
+ if(NOT ${lcName}_POPULATED)
+ FetchContent_Populate(${lcName})
+ add_subdirectory(${${lcName}_SOURCE_DIR} ${${lcName}_BINARY_DIR} EXCLUDE_FROM_ALL)
+ endif()
+ FetchContent_MakeAvailable(fmt)
+ foreach(module IN LISTS FMT_LIB_LIST)
+ list(APPEND LIB_MODULES ${module})
+ endforeach()
+endif()
+if(NOT FMT_FOUND)
+ return()
+endif()
diff --git a/cmake/packages/FindGTest.cmake b/cmake/packages/FindGTest.cmake
new file mode 100644
index 0000000..e10c997
--- /dev/null
+++ b/cmake/packages/FindGTest.cmake
@@ -0,0 +1,49 @@
+# Package Info.
+set(GTEST_NAME "GTest")
+set(GTEST_DESCRIPTION "GoogleTest - Google Testing and Mocking Framework.")
+
+# Pakcage option.
+option(USE_GOOGLE_TEST ${GTEST_DESCRIPTION} FALSE)
+if (USE_GOOGLE_TEST)
+ add_definitions(-DUSE_GOOGLE_TEST)
+ # Define the repository URL and tag for the Boost libraries
+ set(GTEST_URL "https://github.com/google/googletest.git")
+if(FORCE_UPGRADED_LIBS)
+ set(GTEST_TAG "master")
+else()
+ set(GTEST_TAG "v1.13.0")
+endif()
+ set(GTEST_LIB_LIST "gtest" CACHE STRING "List of modules (separated by a semicolon)")
+endif()
+
+find_package(PkgConfig QUIET)
+pkg_search_module(GTest gtest)
+# Package data repository.
+if(USE_GOOGLE_TEST)
+ set(FETCHCONTENT_QUIET off)
+ get_filename_component(gtest_base "${CMAKE_CURRENT_SOURCE_DIR}/${THIRD_PARTY}/gtest"
+ REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+ set(FETCHCONTENT_BASE_DIR ${gtest_base})
+ FetchContent_Declare(
+ gtest
+ GIT_REPOSITORY ${GTEST_URL}
+ GIT_TAG ${GTEST_TAG}
+ GIT_PROGRESS TRUE
+ USES_TERMINAL_DOWNLOAD TRUE
+ )
+
+ # Check if population has already been performed
+ FetchContent_GetProperties(gtest)
+ string(TOLOWER "gtest" lcName)
+ if(NOT ${lcName}_POPULATED)
+ FetchContent_Populate(${lcName})
+ add_subdirectory(${${lcName}_SOURCE_DIR} ${${lcName}_BINARY_DIR} EXCLUDE_FROM_ALL)
+ endif()
+ FetchContent_MakeAvailable(gtest)
+ foreach(module IN LISTS GTEST_LIB_LIST)
+ list(APPEND LIB_MODULES ${module})
+ endforeach()
+endif()
+if(NOT GTEST_FOUND)
+ return()
+endif()
diff --git a/cmake/packages/FindJSon.cmake b/cmake/packages/FindJSon.cmake
new file mode 100644
index 0000000..27779fe
--- /dev/null
+++ b/cmake/packages/FindJSon.cmake
@@ -0,0 +1,54 @@
+# Package Info.
+set(JSON_NAME "JSon")
+
+if(USE_BOOST)
+ set(JSON_DESCRIPTION "A C++11 or library for parsing and serializing JSON to and from a DOM container in memory based on Boost.")
+else()
+ set(JSON_DESCRIPTION "A C++ library for interacting with JSON.")
+endif()
+
+# Pakcage option.
+option(USE_JSON ${JSON_DESCRIPTION} FALSE)
+if (USE_JSON)
+ add_definitions(-DUSE_JSON)
+ # Define the repository URL and tag for the Boost libraries
+ set(JSON_URL "https://github.com/open-source-parsers/jsoncpp.git")
+if(FORCE_UPGRADED_LIBS)
+ set(JSON_TAG "master")
+else()
+ set(JSON_TAG "1.9.5")
+endif()
+ set(JSON_LIB_LIST "jsoncpp_lib" CACHE STRING "List of modules (separated by a semicolon)")
+endif()
+
+find_package(PkgConfig QUIET)
+pkg_search_module(${JSON_NAME} json)
+# Package data repository.
+
+if(USE_JSON)
+ set(FETCHCONTENT_QUIET off)
+ get_filename_component(json_base "${CMAKE_CURRENT_SOURCE_DIR}/${THIRD_PARTY}/${PLATFORM_FOLDER_NAME}/${JSON_NAME}"
+ REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+ set(FETCHCONTENT_BASE_DIR ${json_base})
+ FetchContent_Declare(
+ json
+ GIT_REPOSITORY ${JSON_URL}
+ GIT_TAG ${JSON_TAG}
+ GIT_PROGRESS TRUE
+ )
+ # Check if population has already been performed
+ FetchContent_GetProperties(json)
+ string(TOLOWER "${JSON_NAME}" lcName)
+ if(NOT ${lcName}_POPULATED)
+ FetchContent_Populate(${lcName})
+ add_subdirectory(${${lcName}_SOURCE_DIR} ${${lcName}_BINARY_DIR} EXCLUDE_FROM_ALL)
+ endif()
+ FetchContent_MakeAvailable(json)
+ include_directories(${${lcName}_INCLUDE_DIR})
+ foreach(module IN LISTS JSON_LIB_LIST)
+ list(APPEND LIB_MODULES ${module})
+ endforeach()
+endif()
+if(NOT JSON_FOUND)
+ return()
+endif()
diff --git a/cmake/packages/FindJwt.cmake b/cmake/packages/FindJwt.cmake
new file mode 100644
index 0000000..a56406a
--- /dev/null
+++ b/cmake/packages/FindJwt.cmake
@@ -0,0 +1,41 @@
+# Package Info.
+set(JWT_NAME "Jwt")
+set(JWT_DESCRIPTION "A header only library for creating and validating json web tokens in c++")
+
+# Pakcage option.
+option(USE_JWT ${JWT_DESCRIPTION} FALSE)
+if (USE_JWT)
+ add_definitions(-DUSE_JWT)
+ # Define the repository URL and tag for the JWT libraries
+ set(JWT_URL "https://github.com/Thalhammer/jwt-cpp.git")
+if(FORCE_UPGRADED_LIBS)
+ set(JWT_TAG "master")
+else()
+ set(JWT_TAG "v0.7.0-rc.0")
+endif()
+endif()
+
+if(USE_JWT)
+ set(FETCHCONTENT_QUIET off)
+ get_filename_component(jwt_base "${CMAKE_CURRENT_SOURCE_DIR}/${THIRD_PARTY}/${PLATFORM_FOLDER_NAME}/${JWT_NAME}"
+ REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+ set(FETCHCONTENT_BASE_DIR ${jwt_base})
+ FetchContent_Declare(
+ jwt
+ GIT_REPOSITORY ${JWT_URL}
+ GIT_TAG ${JWT_TAG}
+ GIT_PROGRESS TRUE
+ )
+ # Check if population has already been performed
+ FetchContent_GetProperties(jwt)
+ string(TOLOWER "${JWT_NAME}" lcName)
+ if(NOT ${lcName}_POPULATED)
+ FetchContent_Populate(${lcName})
+ include_directories(${${lcName}_SOURCE_DIR}/include)
+ endif()
+ FetchContent_MakeAvailable(jwt)
+ list(APPEND LIB_MODULES ssl crypto)
+endif()
+if(NOT JWT_FOUND)
+ return()
+endif()
diff --git a/cmake/packages/FindOpenCV.cmake b/cmake/packages/FindOpenCV.cmake
new file mode 100644
index 0000000..7e3baaf
--- /dev/null
+++ b/cmake/packages/FindOpenCV.cmake
@@ -0,0 +1,54 @@
+# Package Info.
+set(OPENCV_NAME "OpenCV")
+set(OPENCV_DESCRIPTION "Open Source Computer Vision Library.")
+# Pakcage option.
+option(USE_OPENCV ${OPENCV_DESCRIPTION} FALSE)
+if (USE_OPENCV)
+ add_definitions(-DUSE_OPENCV)
+ # Define the repository URL and tag for the OpenCV libraries
+ set(OPENCV_URL "https://github.com/opencv/opencv.git")
+if(FORCE_UPGRADED_LIBS)
+ set(OPENCV_TAG "master")
+else()
+ set(OPENCV_TAG "4.7.0")
+endif()
+ set(OPENCV_LIB_LIST "opencv_core;opencv_imgproc;opencv_imgcodecs;opencv_highgui;" CACHE STRING "List of modules (separated by a semicolon)")
+endif()
+
+set(OPENCV_MODULES_LIST "core;calib3d;dnn;features2d;flann;gapi;highgui;imgcodecs;imgproc;java;js;ml;objc;objdetect;photo;python;stitching;ts;video;videoio;world;" CACHE STRING "List of modules (separated by a semicolon)")
+
+find_package(PkgConfig QUIET)
+pkg_search_module(OpenCV opencv)
+# Package data repository.
+if(USE_OPENCV)
+ set(FETCHCONTENT_QUIET off)
+ get_filename_component(opencv_base "${CMAKE_CURRENT_SOURCE_DIR}/${THIRD_PARTY}/${OPENCV_NAME}"
+ REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+ set(FETCHCONTENT_BASE_DIR ${opencv_base})
+ # Declare the OPENCV libraries with their submodules using FetchContent_Declare
+ FetchContent_Declare(
+ OPENCV
+ GIT_REPOSITORY ${OPENCV_URL}
+ GIT_TAG ${OPENCV_TAG}
+ GIT_PROGRESS TRUE
+ USES_TERMINAL_DOWNLOAD TRUE
+ )
+ # Check if population has already been performed
+ FetchContent_GetProperties(opencv)
+ string(TOLOWER "${OPENCV_NAME}" lcName)
+ if(NOT ${lcName}_POPULATED)
+ FetchContent_Populate(${lcName})
+ add_subdirectory(${${lcName}_SOURCE_DIR} ${${lcName}_BINARY_DIR} EXCLUDE_FROM_ALL)
+ endif()
+ FetchContent_MakeAvailable(opencv)
+ include_directories(${${lcName}_SOURCE_DIR}/include)
+ foreach(module IN LISTS OPENCV_LIB_LIST)
+ list(APPEND LIB_MODULES ${module})
+ endforeach()
+ foreach(module IN LISTS OPENCV_MODULES_LIST)
+ list(APPEND LIB_TARGET_INCLUDE_DIRECTORIES ${${lcName}_SOURCE_DIR}/modules/${module}/include)
+ endforeach()
+endif()
+if(NOT OPENCV_FOUND)
+ return()
+endif()
diff --git a/cmake/packages/FindOpenMesh.cmake b/cmake/packages/FindOpenMesh.cmake
new file mode 100644
index 0000000..edc952d
--- /dev/null
+++ b/cmake/packages/FindOpenMesh.cmake
@@ -0,0 +1,51 @@
+# Package Info.
+set(OPENMESH_NAME "OpenMesh")
+set(OPENMESH_DESCRIPTION "A generic and efficient polygon mesh data structure.")
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
+
+# Pakcage option.
+option(USE_OPENMESH ${OPENMESH_DESCRIPTION} FALSE)
+if (USE_OPENMESH)
+ add_definitions(-DUSE_OPENMESH)
+ # Define the repository URL and tag for the OpenMesh libraries
+ set(OPENMESH_URL "https://github.com/Lawrencemm/openmesh.git")
+if(FORCE_UPGRADED_LIBS)
+ set(OPENMESH_TAG "master")
+else()
+ set(OPENMESH_TAG "lm-minimal")
+endif()
+endif()
+
+find_package(PkgConfig QUIET)
+pkg_search_module(${OPENMESH_NAME} openmesh)
+# Package data repository.
+if(USE_OPENMESH)
+ set(FETCHCONTENT_QUIET off)
+ get_filename_component(openmesh_base "${CMAKE_CURRENT_SOURCE_DIR}/${THIRD_PARTY}/${OPENMESH_NAME}"
+ REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+ set(FETCHCONTENT_BASE_DIR ${openmesh_base})
+ FetchContent_Declare(
+ openmesh
+ GIT_REPOSITORY ${OPENMESH_URL}
+ GIT_TAG ${OPENMESH_TAG}
+ GIT_PROGRESS TRUE
+ USES_TERMINAL_DOWNLOAD TRUE
+ )
+
+ # Check if population has already been performed
+ FetchContent_GetProperties(openmesh)
+ string(TOLOWER "openmesh" lcName)
+ if(NOT ${lcName}_POPULATED)
+ FetchContent_Populate(${lcName})
+ add_subdirectory(${${lcName}_SOURCE_DIR} ${${lcName}_BINARY_DIR} EXCLUDE_FROM_ALL)
+ endif()
+ FetchContent_MakeAvailable(openmesh)
+ list(APPEND LIB_TARGET_INCLUDE_DIRECTORIES ${OPENMESH_INCLUDE_DIRS})
+ list(APPEND LIB_TARGET_LIBRARY_DIRECTORIES ${OPENMESH_LIBRARY_DIRS})
+ list(APPEND LIB_TARGET_LINK_DIRECTORIES ${OPENMESH_LIBRARY_DIRS})
+ list(APPEND LIB_MODULES ${OPENMESH_LIBRARIES})
+ list(APPEND LIB_TARGET_COMPILER_DEFINATION -D_USE_MATH_DEFINES)
+endif()
+if(NOT OPENMESH_FOUND)
+ return()
+endif()
diff --git a/cmake/packages/FindOpenSSL.cmake b/cmake/packages/FindOpenSSL.cmake
new file mode 100644
index 0000000..fd41f06
--- /dev/null
+++ b/cmake/packages/FindOpenSSL.cmake
@@ -0,0 +1,50 @@
+# Package Info.
+set(OPENSSL_NAME "OpenSSL")
+set(OPENSSL_DESCRIPTION "TLS/SSL and crypto library.")
+
+# Pakcage option.
+option(USE_OPENSSL ${OPENSSL_DESCRIPTION} FALSE)
+if (USE_OPENSSL)
+ add_definitions(-DUSE_OPENSSL)
+endif()
+
+set(OPENSSL_WASM_PATH_INCLUDE "")
+set(OPENSSL_WASM_PATH_LIB "")
+
+if (USE_OPENSSL)
+ add_definitions(-DUSE_OPENSSL)
+endif()
+
+# Package data repository.
+if(USE_OPENSSL)
+ # Search OpenSSL
+ if(EMSCRIPTEN)
+ message("Using emscripten!")
+ message("Set custom emscripten lib!")
+ list(APPEND LIB_MODULES ssl crypto)
+ list(APPEND LIB_TARGET_INCLUDE_DIRECTORIES ${OPENSSL_WASM_PATH_INCLUDE})
+ list(APPEND LIB_TARGET_LIBRARY_DIRECTORIES ${OPENSSL_WASM_PATH_LIB})
+ list(APPEND LIB_TARGET_LINK_DIRECTORIES ${OPENSSL_WASM_PATH_LIB})
+ list(APPEND LIB_TARGET_COMPILER_DEFINATION "")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s WASM=1 -s USE_ZLIB=1")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s WASM=1 -s USE_ZLIB=1")
+ else()
+ find_package(PkgConfig REQUIRED)
+ pkg_search_module(OPENSSL REQUIRED openssl)
+ if( OPENSSL_FOUND )
+ message(STATUS "Using OpenSSL ${OPENSSL_VERSION}")
+ else()
+ # Error; with REQUIRED, pkg_search_module() will throw an error by it's own
+ endif()
+ list(APPEND LIB_MODULES ssl crypto)
+ list(APPEND LIB_TARGET_INCLUDE_DIRECTORIES ${OPENSSL_INCLUDE_DIRS})
+ list(APPEND LIB_TARGET_LIBRARY_DIRECTORIES ${OPENSSL_LIBRARY_DIRS})
+ list(APPEND LIB_TARGET_LINK_DIRECTORIES ${OPENSSL_LIBRARY_DIRS})
+ list(APPEND LIB_TARGET_COMPILER_DEFINATION "")
+ endif()
+
+endif()
+if(NOT OPENSSL_FOUND)
+ message("Please install OpenSSL from system root first! Use [https://www.openssl.org/source/]")
+ return()
+endif()
diff --git a/cmake/packages/FindZlib.cmake b/cmake/packages/FindZlib.cmake
new file mode 100644
index 0000000..afcf24a
--- /dev/null
+++ b/cmake/packages/FindZlib.cmake
@@ -0,0 +1,49 @@
+# Package Info.
+set(ZLIB_NAME "Zlib")
+set(ZLIB_DESCRIPTION "A massively spiffy yet delicately unobtrusive compression library.")
+
+# Pakcage option.
+option(USE_ZLIB ${ZLIB_DESCRIPTION} FALSE)
+if (USE_ZLIB)
+ add_definitions(-DUSE_ZLIB)
+ # Define the repository URL and tag for the Zlib libraries
+ set(ZLIB_URL "https://github.com/madler/zlib.git")
+if(FORCE_UPGRADED_LIBS)
+ set(ZLIB_TAG "master")
+else()
+ set(ZLIB_TAG "v1.2.13")
+endif()
+endif()
+
+find_package(PkgConfig QUIET)
+pkg_search_module(${ZLIB_NAME} zlib)
+# Package data repository.
+if(USE_ZLIB)
+ set(FETCHCONTENT_QUIET off)
+ get_filename_component(zlib_base "${CMAKE_CURRENT_SOURCE_DIR}/${THIRD_PARTY}/${PLATFORM_FOLDER_NAME}/${ZLIB_NAME}"
+ REALPATH BASE_DIR "${CMAKE_BINARY_DIR}")
+ set(FETCHCONTENT_BASE_DIR ${zlib_base})
+ FetchContent_Declare(
+ zlib
+ GIT_REPOSITORY ${ZLIB_URL}
+ GIT_TAG ${ZLIB_TAG}
+ GIT_PROGRESS TRUE
+ )
+ # Check if population has already been performed
+ FetchContent_GetProperties(zlib)
+ string(TOLOWER "${ZLIB_NAME}" lcName)
+ if(NOT ${lcName}_POPULATED)
+ FetchContent_Populate(${lcName})
+ add_subdirectory(${${lcName}_SOURCE_DIR} ${${lcName}_BINARY_DIR} EXCLUDE_FROM_ALL)
+ endif()
+ FetchContent_MakeAvailable(zlib)
+ list(APPEND LIB_MODULES zlib)
+ list(APPEND LIB_TARGET_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIRS})
+ list(APPEND LIB_TARGET_LIBRARY_DIRECTORIES ${ZLIB_LIBRARY_DIRS})
+ list(APPEND LIB_TARGET_LINK_DIRECTORIES ${ZLIB_LIBRARY_DIRS})
+ list(APPEND LIB_TARGET_COMPILER_DEFINATION "")
+ list(APPEND LIB_TARGET_PROPERTIES "-D_FILE_OFFSET_BITS=64")
+endif()
+if(NOT ZLIB_FOUND)
+ return()
+endif()
diff --git a/cmake/platforms-toolchain/android-toolchain.cmake b/cmake/platforms-toolchain/android-toolchain.cmake
new file mode 100644
index 0000000..b51530b
--- /dev/null
+++ b/cmake/platforms-toolchain/android-toolchain.cmake
@@ -0,0 +1,58 @@
+# Standard settings for Android
+set(CMAKE_SYSTEM_NAME Android)
+set(CMAKE_SYSTEM_VERSION 21) # Android API level (can be changed to your target version)
+set(CMAKE_CROSSCOMPILING TRUE)
+set(ANDROID TRUE)
+set(PLATFORM_FOLDER "Android")
+
+#------ PROJECT DIRECTORIES ------
+# Define base build directory for Android
+set(dir ${CMAKE_CURRENT_SOURCE_DIR}/build/${PLATFORM_FOLDER})
+
+# Set output directories for executables, libraries, and other build files
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${dir})
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${dir}/lib)
+set(CMAKE_BUILD_FILES_DIRECTORY ${dir})
+set(CMAKE_BINARY_DIR ${dir})
+set(CMAKE_CACHEFILE_DIR ${dir})
+
+# Ensure all output paths are unified
+set(EXECUTABLE_OUTPUT_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
+
+# Set NDK path (if it's not set globally, you can also set the NDK path here)
+# set(ANDROID_NDK "/path/to/your/ndk") # Uncomment if needed
+
+if(ANDROID_SDK_ROOT)
+include(${ANDROID_SDK_ROOT}/android_openssl/CMakeLists.txt)
+endif()
+
+if(ANDROID_SDK)
+include(${ANDROID_SDK}/android_openssl/CMakeLists.txt)
+endif()
+
+# Specify the Android ABIs (Architectures) to target
+set(ANDROID_ABI "arm64-v8a" CACHE STRING "Android ABI" FORCE) # You can use "armeabi-v7a", "x86", "x86_64", "arm64-v8a"
+set(ANDROID_NATIVE_API_LEVEL 21) # Android API level, the minimum required by your app
+
+# Set Android toolchain file (you need to provide the correct path to the Android toolchain file)
+set(CMAKE_TOOLCHAIN_FILE ${ANDROID_NDK}/build/cmake/android.toolchain.cmake)
+
+# Android-specific libraries (Android system libraries)
+# You can add more libraries depending on your requirements (e.g., OpenGL, Vulkan, JNI, etc.)
+set(OS_LIBS
+ "-landroid" # Basic Android library
+ "-lEGL" # OpenGL ES library
+ "-lGLESv2" # OpenGL ES 2.0
+ "-ljnigraphics" # JNI Graphics interface (useful for drawing)
+ "-llog" # Android log library (for logging in C++ code)
+)
+
+# Output information for debugging
+message("Build directory: ${dir}")
+message("CMAKE_RUNTIME_OUTPUT_DIRECTORY: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+message("CMAKE_LIBRARY_OUTPUT_DIRECTORY: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+message("Android NDK path: ${ANDROID_NDK}")
+message("Android ABI: ${ANDROID_ABI}")
+message("Android API Level: ${ANDROID_NATIVE_API_LEVEL}")
+message("Android Libraries: ${OS_LIBS}")
diff --git a/cmake/platforms-toolchain/ios-toolchain.cmake b/cmake/platforms-toolchain/ios-toolchain.cmake
new file mode 100644
index 0000000..ce783b4
--- /dev/null
+++ b/cmake/platforms-toolchain/ios-toolchain.cmake
@@ -0,0 +1,37 @@
+# Standard settings for iOS
+set(CMAKE_SYSTEM_NAME iOS)
+set(CMAKE_SYSTEM_VERSION 13.0) # You can adjust this to the minimum iOS version required
+set(CMAKE_CROSSCOMPILING TRUE)
+set(IOS TRUE)
+set(PLATFORM_FOLDER "iOS")
+
+#------ PROJECT DIRECTORIES ------
+# Define base build directory for iOS
+set(dir ${CMAKE_CURRENT_SOURCE_DIR}/build/${PLATFORM_FOLDER})
+
+# Set output directories for executables, libraries, and other build files
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${dir})
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${dir}/lib)
+set(CMAKE_BUILD_FILES_DIRECTORY ${dir})
+set(CMAKE_BINARY_DIR ${dir})
+set(CMAKE_CACHEFILE_DIR ${dir})
+
+# Ensure all output paths are unified
+set(EXECUTABLE_OUTPUT_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
+
+# iOS-specific libraries and frameworks
+# You will need to link the appropriate iOS frameworks depending on your application's requirements.
+set(OS_LIBS
+ "-framework Foundation" # Core iOS Foundation framework
+ "-framework UIKit" # User interface components
+ "-framework CoreGraphics" # 2D drawing framework
+ "-framework CoreMedia" # Media and video processing
+ "-framework AVFoundation" # Audio and video framework
+)
+
+# Output information for debugging
+message("Build directory: ${dir}")
+message("CMAKE_RUNTIME_OUTPUT_DIRECTORY: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+message("CMAKE_LIBRARY_OUTPUT_DIRECTORY: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+message("iOS Libraries: ${OS_LIBS}")
diff --git a/cmake/platforms-toolchain/linux-toolchain.cmake b/cmake/platforms-toolchain/linux-toolchain.cmake
new file mode 100644
index 0000000..cc1d2f4
--- /dev/null
+++ b/cmake/platforms-toolchain/linux-toolchain.cmake
@@ -0,0 +1,44 @@
+# Standard settings for Linux systems
+set(CMAKE_SYSTEM_NAME Linux) # Set system to Linux
+set(CMAKE_SYSTEM_VERSION 1) # Version is generic for all Linux distributions
+set(CMAKE_CROSSCOMPILING FALSE) # Not cross-compiling
+set (LINUX TRUE)
+set(PLATFORM_FOLDER "Linux")
+
+#------ PROJECT DIRECTORIES ------
+# Define base build directory
+set(dir ${CMAKE_CURRENT_SOURCE_DIR}/build/${PLATFORM_FOLDER})
+
+# Set output directories for executables, libraries, and other build files
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${dir})
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${dir}/lib)
+set(CMAKE_BUILD_FILES_DIRECTORY ${dir})
+set(CMAKE_BINARY_DIR ${dir})
+set(CMAKE_CACHEFILE_DIR ${dir})
+
+# Ensure all output paths are unified
+set(EXECUTABLE_OUTPUT_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
+
+# Linux system libraries - Common across most Linux distributions
+set(OS_LIBS
+ "-lpthread" # Pthread library for multithreading (POSIX threads)
+ "-lm" # Math library (for common math functions like sqrt, sin, etc.)
+ "-lstdc++" # Standard C++ library
+ "-lc" # C standard library
+ "-ldl" # Dynamic loading library
+ "-lrt" # Real-time extensions for Linux systems
+ "-lX11" # X11 library for graphical applications (if needed)
+ "-lssl -lcrypto" # OpenSSL for encryption (if needed)
+)
+
+# Optional: Add other libraries depending on the specific Linux distribution or features you need
+# For example, for network-related features or GUI, you can add:
+# set(OS_LIBS ${OS_LIBS} "-lgtk-3") # If using GTK+ for GUI applications
+# set(OS_LIBS ${OS_LIBS} "-lboost_system -lboost_filesystem") # If using Boost
+
+# Output information for debugging
+message("Build directory: ${dir}")
+message("CMAKE_RUNTIME_OUTPUT_DIRECTORY: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+message("CMAKE_LIBRARY_OUTPUT_DIRECTORY: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+message("Linux Libraries: ${OS_LIBS}")
diff --git a/cmake/platforms-toolchain/macos-toolchain.cmake b/cmake/platforms-toolchain/macos-toolchain.cmake
new file mode 100644
index 0000000..732db06
--- /dev/null
+++ b/cmake/platforms-toolchain/macos-toolchain.cmake
@@ -0,0 +1,36 @@
+# Standard settings for macOS
+set(CMAKE_SYSTEM_NAME Darwin)
+set(CMAKE_SYSTEM_VERSION 1)
+set(CMAKE_CROSSCOMPILING TRUE)
+set(APPLE TRUE)
+set(PLATFORM_FOLDER "macOS")
+
+#------ PROJECT DIRECTORIES ------
+# Define base build directory for macOS
+set(dir ${CMAKE_CURRENT_SOURCE_DIR}/build/${PLATFORM_FOLDER})
+
+# Set output directories for executables, libraries, and other build files
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${dir})
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${dir}/lib)
+set(CMAKE_BUILD_FILES_DIRECTORY ${dir})
+set(CMAKE_BINARY_DIR ${dir})
+set(CMAKE_CACHEFILE_DIR ${dir})
+
+# Ensure all output paths are unified
+set(EXECUTABLE_OUTPUT_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
+
+# macOS specific libraries and frameworks
+set(OS_LIBS
+ "-framework IOKit"
+ "-framework ApplicationServices"
+ "-framework CoreServices"
+ "-framework CoreGraphics"
+ "-framework Foundation"
+)
+
+# Output information for debugging
+message("Build directory: ${dir}")
+message("CMAKE_RUNTIME_OUTPUT_DIRECTORY: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+message("CMAKE_LIBRARY_OUTPUT_DIRECTORY: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+message("macOS Frameworks: ${OS_LIBS}")
diff --git a/cmake/platforms-toolchain/unix-toolchain.cmake b/cmake/platforms-toolchain/unix-toolchain.cmake
new file mode 100644
index 0000000..701a4d7
--- /dev/null
+++ b/cmake/platforms-toolchain/unix-toolchain.cmake
@@ -0,0 +1,41 @@
+# Standard settings for Unix-like systems (FreeBSD, OpenBSD, etc.)
+set(CMAKE_SYSTEM_NAME UNIX) # Generic Unix system for FreeBSD, OpenBSD, etc.
+set(CMAKE_SYSTEM_VERSION 1) # Version is generic for all Unix-like systems
+set(CMAKE_CROSSCOMPILING FALSE) # We are not cross-compiling
+set (UNIX TRUE)
+set(PLATFORM_FOLDER "Unix")
+
+#------ PROJECT DIRECTORIES ------
+# Define base build directory
+set(dir ${CMAKE_CURRENT_SOURCE_DIR}/build/${PLATFORM_FOLDER})
+
+# Set output directories for executables, libraries, and other build files
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${dir})
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${dir}/lib)
+set(CMAKE_BUILD_FILES_DIRECTORY ${dir})
+set(CMAKE_BINARY_DIR ${dir})
+set(CMAKE_CACHEFILE_DIR ${dir})
+
+# Ensure all output paths are unified
+set(EXECUTABLE_OUTPUT_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
+
+# Unix system libraries - Common across most BSD-like systems
+set(OS_LIBS
+ "-lpthread" # Pthread library for multithreading (POSIX threads)
+ "-lm" # Math library (for common math functions like sqrt, sin, etc.)
+ "-lstdc++" # Standard C++ library
+ "-lc" # C standard library
+ "-ldl" # Dynamic loading library (for Unix-like systems)
+ "-lrt" # Real-time extensions for Unix-like systems
+)
+
+# Optional: Add more libraries depending on the specific BSD system or features you need
+# set(OS_LIBS ${OS_LIBS} "-lX11") # If using X11 for graphical apps
+# set(OS_LIBS ${OS_LIBS} "-lssl -lcrypto") # If using OpenSSL for encryption
+
+# Output information for debugging
+message("Build directory: ${dir}")
+message("CMAKE_RUNTIME_OUTPUT_DIRECTORY: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+message("CMAKE_LIBRARY_OUTPUT_DIRECTORY: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+message("Unix-like Libraries: ${OS_LIBS}")
diff --git a/cmake/platforms-toolchain/wasm-toolchain.cmake b/cmake/platforms-toolchain/wasm-toolchain.cmake
new file mode 100644
index 0000000..b293265
--- /dev/null
+++ b/cmake/platforms-toolchain/wasm-toolchain.cmake
@@ -0,0 +1,27 @@
+# Standard settings for Wasm systems
+set(CMAKE_SYSTEM_NAME WASM) # Generic Wasm system for Web.
+set(CMAKE_SYSTEM_VERSION 1) # Version is generic for all wasm systems
+set(CMAKE_CROSSCOMPILING FALSE) # We are not cross-compiling
+set (WASM TRUE)
+set(PLATFORM_FOLDER "Wasm")
+
+#------ PROJECT DIRECTORIES ------
+# Define base build directory
+set(dir ${CMAKE_CURRENT_SOURCE_DIR}/build/${PLATFORM_FOLDER})
+
+# Set output directories for executables, libraries, and other build files
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${dir})
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${dir}/lib)
+set(CMAKE_BUILD_FILES_DIRECTORY ${dir})
+set(CMAKE_BINARY_DIR ${dir})
+set(CMAKE_CACHEFILE_DIR ${dir})
+
+# Ensure all output paths are unified
+set(EXECUTABLE_OUTPUT_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
+
+# Output information for debugging
+message("Build directory: ${dir}")
+message("CMAKE_RUNTIME_OUTPUT_DIRECTORY: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+message("CMAKE_LIBRARY_OUTPUT_DIRECTORY: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+message("Unix-like Libraries: ${OS_LIBS}")
diff --git a/cmake/platforms-toolchain/windows-toolchain.cmake b/cmake/platforms-toolchain/windows-toolchain.cmake
new file mode 100644
index 0000000..5898ead
--- /dev/null
+++ b/cmake/platforms-toolchain/windows-toolchain.cmake
@@ -0,0 +1,36 @@
+# Standard settings for Windows
+set(CMAKE_SYSTEM_NAME Windows)
+set(CMAKE_SYSTEM_VERSION 10) # Set the system version (you can adjust if needed)
+set(CMAKE_CROSSCOMPILING TRUE)
+set(WINDOWS TRUE)
+set(PLATFORM_FOLDER "Windows")
+
+#------ PROJECT DIRECTORIES ------
+# Define base build directory for Windows
+set(dir ${CMAKE_CURRENT_SOURCE_DIR}/build/${PLATFORM_FOLDER})
+
+# Set output directories for executables, libraries, and other build files
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${dir})
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${dir}/lib)
+set(CMAKE_BUILD_FILES_DIRECTORY ${dir})
+set(CMAKE_BINARY_DIR ${dir})
+set(CMAKE_CACHEFILE_DIR ${dir})
+
+# Ensure all output paths are unified
+set(EXECUTABLE_OUTPUT_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
+
+# Windows specific libraries and settings
+# For simplicity, here are some commonly used libraries on Windows.
+# You may need to modify this list based on your project's requirements.
+set(OS_LIBS
+ "user32.lib" # Basic Windows user interface library
+ "gdi32.lib" # Windows graphics device interface library
+ "kernel32.lib" # Kernel-level services
+)
+
+# Output information for debugging
+message("Build directory: ${dir}")
+message("CMAKE_RUNTIME_OUTPUT_DIRECTORY: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+message("CMAKE_LIBRARY_OUTPUT_DIRECTORY: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+message("Windows Libraries: ${OS_LIBS}")
diff --git a/cmake/project-setting.cmake b/cmake/project-setting.cmake
new file mode 100644
index 0000000..5dad25c
--- /dev/null
+++ b/cmake/project-setting.cmake
@@ -0,0 +1,43 @@
+# ------ ADDITIONAL OPTIONS ------
+
+# Use the latest standard of C++
+option(USE_LATEST_STANDARD "Include the latest standard of C++" ON)
+if (USE_LATEST_STANDARD)
+ add_definitions(-DUSE_LATEST_STANDARD)
+endif()
+
+# Include Qt5 Framework features
+option(USE_QT5_FEATURES "Include Qt5 Framework features" OFF)
+if (USE_QT5_FEATURES)
+ add_definitions(-DUSE_QT5_FEATURES)
+endif()
+
+# Include full features of Qt Framework
+option(USE_FULL_QT_FEATURES "Include full features of Qt Framework" OFF)
+if (USE_FULL_QT_FEATURES)
+ add_definitions(-DUSE_FULL_QT_FEATURES)
+endif()
+
+# Include User Interface
+option(GUI_APPLICATION "Include User Interface" ON)
+if (GUI_APPLICATION)
+ add_definitions(-DGUI_APPLICATION)
+endif()
+
+# Force to update to the latest version of dependencies from repositories
+option(FORCE_UPGRADED_LIBS "Force to update to the latest version of dependencies from repositories" OFF)
+if (FORCE_UPGRADED_LIBS)
+ add_definitions(-DFORCE_UPGRADED_LIBS)
+endif()
+
+# Include your own engine
+option(USE_CUSTOM_ENGINE "Include your own engine" OFF)
+if (USE_CUSTOM_ENGINE)
+ add_definitions(-DUSE_CUSTOM_ENGINE)
+endif()
+
+# Your own engine code name as a string
+set(ENGINE_CODE_NAME "Cell" CACHE STRING "Your own engine code name as a string.")
+if (USE_CUSTOM_ENGINE)
+ add_definitions(-DENGINE_CODE_NAME)
+endif()
diff --git a/config.hpp.in b/config.hpp.in
new file mode 100644
index 0000000..e10a414
--- /dev/null
+++ b/config.hpp.in
@@ -0,0 +1,18 @@
+#ifndef PROJECT_CONFIG_HPP
+#define PROJECT_CONFIG_HPP
+
+#define PROJECT_NAME "${PROJECT_NAME}"
+#define PROJECT_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}
+#define PROJECT_VERSION_MINOR ${PROJECT_VERSION_MINOR}
+#define PROJECT_VERSION_PATCH ${PROJECT_VERSION_PATCH}
+#define PROJECT_VERSION ${PROJECT_VERSION}
+#define PROJECT_VERSION_TYPE "${PROJECT_VERSION_TYPE}"
+#define PROJECT_LICENSE_TYPE "${PROJECT_LICENSE_TYPE}"
+#define PROJECT_VERSION_STRING "${PROJECT_VERSION}-${PROJECT_VERSION_TYPE}"
+#define PROJECT_CREATOR "${PROJECT_CREATOR}"
+#define PROJECT_ORGANIZATION "${PROJECT_ORGANIZATION}"
+#define PROJECT_LANGUAGES "${PROJECT_LANGUAGES}"
+#define PROJECT_DESCRIPTION "${PROJECT_DESCRIPTION}"
+#define PROJECT_HOMEPAGE_URL "${PROJECT_HOMEPAGE_URL}"
+
+#endif
diff --git a/config/project.cmake b/config/project.cmake
new file mode 100644
index 0000000..c51ed4d
--- /dev/null
+++ b/config/project.cmake
@@ -0,0 +1,35 @@
+# ------ PROJECT INFO ------
+# You can change "ProjectTemplate" with your project name.
+set(PROJECT_NAME "PT" CACHE STRING "Project Name.")
+set(PROJECT_TARGET ${PROJECT_NAME} CACHE STRING "Project Target Name.")
+set(PROJECT_REAL_NAME "PT" CACHE STRING "Project Real Name.")
+
+# Your project version.
+set(PROJECT_VERSION_MAJOR 1)
+set(PROJECT_VERSION_MINOR 0)
+set(PROJECT_VERSION_PATCH 0)
+
+#Your project creator.
+set(PROJECT_CREATOR "Kambiz Asadzadeh" CACHE STRING "Creator of your project.")
+
+#Your project creator.
+set(PROJECT_ORGANIZATION "The Genyleap" CACHE STRING "Organization name.")
+
+#Your project license type.
+set(PROJECT_LICENSE_TYPE "MIT" CACHE STRING "Project License Type.")
+
+set(PROJECT_VERSION_TYPE "final" CACHE STRING "Version type.")
+
+#Use these keys [application, library]
+set(PROJECT_USAGE_TYPE "application" CACHE STRING "Usage Type.")
+
+#Use these keys [stl, qt, qtwidget, qtquick]
+set(PROJECT_MAIN_TYPE "qtquick" CACHE STRING "Library System.")
+
+set(DEVELOPER_BUNDLE_IDENTIFIER com.genyleap.api.${PROJECT_NAME} CACHE STRING "Developer Bundle Identifier.")
+
+#You can replace your project description with this string.
+set(PROJECT_DESCRIPTION "A template for modern C++ projects with useful features for developing cross-platform projects." CACHE STRING "Project Description")
+
+#Your project website address.
+set(PROJECT_HOMEPAGE_URL "https://github.com/genyleap/Project-Template" CACHE STRING "Project URL.")
diff --git a/config/system-config.json b/config/system-config.json
new file mode 100644
index 0000000..08c3435
--- /dev/null
+++ b/config/system-config.json
@@ -0,0 +1,11 @@
+{
+ "language":"english",
+ "debug": true,
+ "system":{
+ "codename":"Template Name",
+ "version":"1.0.0",
+ "last_update":"2020-01-10 07:00:00",
+ "server_host":"127.0.0.1",
+ "encoding":"utf-8"
+ }
+}
diff --git a/licenses/mit.txt b/licenses/mit.txt
new file mode 100644
index 0000000..f4bb8fc
--- /dev/null
+++ b/licenses/mit.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021 Kambiz
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/precompiled/pch.hpp b/precompiled/pch.hpp
new file mode 100644
index 0000000..9a6de93
--- /dev/null
+++ b/precompiled/pch.hpp
@@ -0,0 +1,351 @@
+/*!
+ * Gen3 License
+ *
+ * Copyright (c) 2024 Kambiz Asadzadeh
+ * Copyright (c) 2024 Genyleap
+ */
+
+#ifndef PCH_HPP
+#define PCH_HPP
+
+#if __cpp_modules
+import std; // Import core language support.
+#ifdef ENABLE_C_FACILITIES
+import std.compat; //Import C++ headers for C library facilities
+#endif
+#else
+
+/*!
+ * Creating and using precompiled headers can do two major things for you:
+ * Can reduce the compilation time of C++ files.
+ * Can reduce the number of lines of code that the compiler must process (in some cases, by several orders of magnitude).
+ */
+
+#ifdef __has_include
+# if __has_include()
+# include
+# endif
+#else
+# include
+#endif
+
+//!Header files for the C++ standard library and extensions, by category.
+
+#ifdef CXX_STANDARD_98
+#error "C++11 or better is required"
+#endif
+
+#include
+#include
+#include
+#include
+#include
+
+//!C++ Style
+#include
+#include
+#include
+#include