From 794e306c2ef856561ba3fdfc5c6c3334f3194769 Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Mon, 15 Oct 2012 17:53:17 +0200 Subject: [PATCH] Cmake build: Use ISO 8601 format for LYX_DATE, this makes it translated --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d917a8bffc..00fe87056a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -265,9 +265,11 @@ if (LYX_LOCALVERSIONING) set(LYX_REVISION_VERSION "${LYX_PATCH_VERSION}-${tmp_REVISION_VERSION}git") endif() # Override the value from configure.ac, if possible - EXECUTE_PROCESS(COMMAND ${LYX_GITVERSION} "log" "-1" "--format=%cd" + EXECUTE_PROCESS(COMMAND ${LYX_GITVERSION} "log" "-1" "--format=%ci" WORKING_DIRECTORY "${TOP_SRC_DIR}" - OUTPUT_VARIABLE LYX_DATE OUTPUT_STRIP_TRAILING_WHITESPACE) + OUTPUT_VARIABLE LYX_DATEtmp OUTPUT_STRIP_TRAILING_WHITESPACE) + + string(REGEX MATCH "([0-9]+-[0-9]+-[0-9]+)" LYX_DATE ${LYX_DATEtmp}) else() set(LYX_REVISION_VERSION git) #TODO use date endif()