From 02bd9f7c06a2db931e444b22ff767171d0027cd3 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 5 May 2019 18:35:40 +0200 Subject: [PATCH] Add new fields to ApplicationInfo --- application/argumentparser.h | 6 ++++++ cmake/templates/config.h.in | 1 + 2 files changed, 7 insertions(+) diff --git a/application/argumentparser.h b/application/argumentparser.h index 47f88f7..d41156b 100644 --- a/application/argumentparser.h +++ b/application/argumentparser.h @@ -25,6 +25,9 @@ struct ApplicationInfo { const char *author = nullptr; const char *version = nullptr; const char *url = nullptr; + const char *description = nullptr; + const char *license = nullptr; + const char *credits = nullptr; std::vector dependencyVersions; }; @@ -51,6 +54,9 @@ CPP_UTILITIES_EXPORT extern ApplicationInfo applicationInfo; ::ApplicationUtilities::applicationInfo.author = APP_AUTHOR; \ ::ApplicationUtilities::applicationInfo.version = APP_VERSION; \ ::ApplicationUtilities::applicationInfo.url = APP_URL; \ + ::ApplicationUtilities::applicationInfo.description = APP_DESCRIPTION; \ + ::ApplicationUtilities::applicationInfo.license = PROJECT_LICENSE; \ + ::ApplicationUtilities::applicationInfo.credits = APP_CREDITS; \ SET_DEPENDENCY_INFO class Argument; diff --git a/cmake/templates/config.h.in b/cmake/templates/config.h.in index 6383376..ef1c76f 100644 --- a/cmake/templates/config.h.in +++ b/cmake/templates/config.h.in @@ -11,6 +11,7 @@ #define APP_NAME "@META_APP_NAME@" #define APP_VERSION "@META_APP_VERSION@" #define APP_AUTHOR "@META_APP_AUTHOR@" +#define APP_CREDITS "@META_APP_CREDITS@" #define APP_URL "@META_APP_URL@" #define APP_DESCRIPTION "@META_APP_DESCRIPTION@" #define APP_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"