From 662d195dfec6e924aef5a9b4d852a03a5671b0b6 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 1 Nov 2020 21:59:27 +0200 Subject: Set version through meson --- src/main.cpp | 9 ++++----- src/version.h.in | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 src/version.h.in (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 441a2c5..b9823e3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,19 +1,18 @@ #include "mainwindow.h" +#include "version.h" #include #include -#define PROJECT_NAME "qimv" - int main(int argc, char **argv) { QApplication app(argc, argv); - app.setApplicationName("qimv"); - app.setApplicationVersion("0.1.0"); + app.setApplicationName(QIMV_NAME); + app.setApplicationVersion(QIMV_VERSION); QCommandLineParser parser; parser.setApplicationDescription("Quick image viewer"); parser.addHelpOption(); parser.addVersionOption(); - parser.addPositionalArgument("image", "Image to show."); + parser.addPositionalArgument("path(s)", "Image(s) to show."); parser.process(app); diff --git a/src/version.h.in b/src/version.h.in new file mode 100644 index 0000000..97bb080 --- /dev/null +++ b/src/version.h.in @@ -0,0 +1,4 @@ +#pragma once + +#define QIMV_NAME "qimv" +#define QIMV_VERSION "@VCS_TAG@" -- cgit v1.2.1