build: add git revision to version

This commit is contained in:
outfoxxed 2024-03-08 23:08:50 -08:00
parent 73fd022b1e
commit b720dfa165
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
4 changed files with 24 additions and 3 deletions

View file

@ -17,6 +17,7 @@ qt_add_executable(quickshell
panelinterface.cpp
)
set_source_files_properties(main.cpp PROPERTIES COMPILE_DEFINITIONS GIT_REVISION="${GIT_REVISION}")
qt_add_qml_module(quickshell URI Quickshell VERSION 0.1)
target_link_libraries(quickshell PRIVATE ${QT_DEPS})

View file

@ -20,7 +20,7 @@
int main(int argc, char** argv) {
const auto app = QGuiApplication(argc, argv);
QGuiApplication::setApplicationName("quickshell");
QGuiApplication::setApplicationVersion("0.1.0");
QGuiApplication::setApplicationVersion("0.1.0 (" GIT_REVISION ")");
QCommandLineParser parser;
parser.addHelpOption();