fix: re-add build date to "About" page (#3464)

Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
This commit is contained in:
Leon Richardt
2022-01-07 17:25:57 +01:00
committed by GitHub
parent 1ba747efb1
commit 42002d80b7
4 changed files with 13 additions and 8 deletions
+8
View File
@@ -593,6 +593,12 @@ set_target_properties(${LIBRARY_PROJECT}
AUTOUIC ON
)
# Used to provide a date of build in the About page (for nightly builds). Getting the actual time of
# compilation in CMake is a more involved, as documented in https://stackoverflow.com/q/24292898.
# For CI runs, however, the date of build file generation should be consistent with the date of
# compilation so this approximation is "good enough" for our purpose.
string(TIMESTAMP cmake_gen_date "%Y-%m-%d")
target_compile_definitions(${LIBRARY_PROJECT} PUBLIC
CHATTERINO
UNICODE
@@ -604,6 +610,8 @@ target_compile_definitions(${LIBRARY_PROJECT} PUBLIC
CHATTERINO_GIT_HASH=\"${GIT_HASH}\"
CHATTERINO_GIT_RELEASE=\"${GIT_RELEASE}\"
CHATTERINO_GIT_COMMIT=\"${GIT_COMMIT}\"
CHATTERINO_CMAKE_GEN_DATE=\"${cmake_gen_date}\"
)
if (USE_SYSTEM_QTKEYCHAIN)
target_compile_definitions(${LIBRARY_PROJECT} PUBLIC