add git_tag

This commit is contained in:
2026-02-14 14:32:02 +01:00
parent 9b728b96e1
commit 0da7be73b2
7 changed files with 11 additions and 3 deletions
+3
View File
@@ -16,3 +16,6 @@
[submodule "external/json"] [submodule "external/json"]
path = external/json path = external/json
url = https://github.com/nlohmann/json.git url = https://github.com/nlohmann/json.git
[submodule "external/git_tag_cpp"]
path = external/git_tag_cpp
url = git@github.com:Sani7/git_tag_cpp.git
+1 -1
View File
@@ -92,7 +92,7 @@ target_include_directories(client
${PROJECT_BINARY_DIR}/ ${PROJECT_BINARY_DIR}/
) )
target_link_libraries(client PRIVATE qwt spdlog Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::WebSockets magic_enum::magic_enum nlohmann_json::nlohmann_json) target_link_libraries(client PRIVATE qwt spdlog Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::WebSockets magic_enum::magic_enum nlohmann_json::nlohmann_json git_tag)
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1. # Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
# If you are developing for iOS or macOS you should consider setting an # If you are developing for iOS or macOS you should consider setting an
+2 -1
View File
@@ -6,6 +6,7 @@
#include <QCommandLineOption> #include <QCommandLineOption>
#include <QCommandLineParser> #include <QCommandLineParser>
#include <QProcess> #include <QProcess>
#include "git_version.h"
#ifdef EMSCRIPTEN #ifdef EMSCRIPTEN
#include <emscripten.h> #include <emscripten.h>
@@ -31,7 +32,7 @@ int main(int argc, char *argv[])
{ {
QApplication a(argc, argv); QApplication a(argc, argv);
QCommandLineParser parser; QCommandLineParser parser;
parser.setApplicationDescription("unisim_cpp client"); parser.setApplicationDescription("unisim_cpp client - version: " + QString::fromStdString(Git_version::shortSha1) + QString::fromStdString(Git_version::dirty ? "-dirty" : ""));
parser.addHelpOption(); parser.addHelpOption();
QCommandLineOption host_option(QStringList() << "s" QCommandLineOption host_option(QStringList() << "s"
+1
View File
@@ -1,5 +1,6 @@
add_subdirectory(color) add_subdirectory(color)
add_subdirectory(cpp-templates) add_subdirectory(cpp-templates)
add_subdirectory(git_tag_cpp)
add_subdirectory(json) add_subdirectory(json)
add_subdirectory(magic_enum) add_subdirectory(magic_enum)
add_subdirectory(spdlog) add_subdirectory(spdlog)
Vendored Submodule
+1
Submodule external/git_tag_cpp added at 9d15e605c4
+1
View File
@@ -62,6 +62,7 @@ target_link_libraries(server PRIVATE
UI UI
cpp_templates cpp_templates
${GPIOD_LIB} ${GPIOD_LIB}
git_tag
) )
+2 -1
View File
@@ -7,6 +7,7 @@
#include "spdlog/spdlog.h" #include "spdlog/spdlog.h"
#include "simulators.hpp" #include "simulators.hpp"
#include "git_version.h"
void init_logger() void init_logger()
{ {
@@ -28,7 +29,7 @@ int main(int argc, char *argv[])
QCoreApplication a(argc, argv); QCoreApplication a(argc, argv);
QCommandLineParser parser; QCommandLineParser parser;
parser.setApplicationDescription("unisim_cpp server"); parser.setApplicationDescription("unisim_cpp server - version: " + QString::fromStdString(Git_version::shortSha1) + QString::fromStdString(Git_version::dirty ? "-dirty" : ""));
parser.addHelpOption(); parser.addHelpOption();
QCommandLineOption port_option(QStringList() << "p" QCommandLineOption port_option(QStringList() << "p"