qmlpuppet: add .tag reading for GIT_SHA

Change-Id: I29f0663b9bbc6f68c7f802fa8fef4b12e091ee61
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Tim Jenssen
2022-12-21 11:56:27 +01:00
parent 01b71195f0
commit f396b0b742

View File

@@ -55,6 +55,11 @@ execute_process(
ERROR_VARIABLE GIT_SHA_ERROR
)
#if we are not a git repository use the .tag file
if(NOT GIT_SHA_OUTPUT)
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/../../../.tag GIT_SHA_OUTPUT)
endif()
add_definitions( -D GIT_SHA=${GIT_SHA_OUTPUT} )
extend_qtc_executable(qml2puppet