From 40a28149a1f3d8d15da0a0e11be86f0d7109ae14 Mon Sep 17 00:00:00 2001 From: Alison Watson Date: Sun, 9 Jun 2019 16:31:09 -0400 Subject: [PATCH] tycho: add version and authors --- source/tycho/CMakeLists.txt | 7 +++++++ source/tycho/cc_source/menu.cc | 2 ++ 2 files changed, 9 insertions(+) diff --git a/source/tycho/CMakeLists.txt b/source/tycho/CMakeLists.txt index 088f05d..71ea8a0 100644 --- a/source/tycho/CMakeLists.txt +++ b/source/tycho/CMakeLists.txt @@ -50,6 +50,13 @@ target_include_directories( $ENV{OUT_DIR} ) +target_compile_definitions( + maraiah-tycho-hermes + PUBLIC + -DTYCHO_VERSION=\"$ENV{CARGO_PKG_VERSION}\" + -DTYCHO_AUTHORS=\"$ENV{CARGO_PKG_AUTHORS}\" +) + target_link_libraries( maraiah-tycho-hermes Qt5::Core diff --git a/source/tycho/cc_source/menu.cc b/source/tycho/cc_source/menu.cc index f86c059..caed18b 100644 --- a/source/tycho/cc_source/menu.cc +++ b/source/tycho/cc_source/menu.cc @@ -44,6 +44,8 @@ void Menu::openAbout() Ui::About about{}; about.setupUi(&dlg); + about.labelVer->setText(tr(TYCHO_VERSION)); + about.labelAuthors->setText(tr(TYCHO_AUTHORS)); dlg.exec(); }