summaryrefslogtreecommitdiffstats
path: root/CMakeScripts/inkscape-version.cmake
diff options
context:
space:
mode:
authorsu-v <suv-sf@users.sf.net>2017-07-01 14:51:03 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2017-07-01 14:51:03 +0000
commitc666dd26e5ff8d4dd9381bff5c2e954ae330fc15 (patch)
tree59fa52d68d59b1294623edc60434cc2e5fdc0df6 /CMakeScripts/inkscape-version.cmake
parentFix a compiling error on debian testing (diff)
downloadinkscape-c666dd26e5ff8d4dd9381bff5c2e954ae330fc15.tar.gz
inkscape-c666dd26e5ff8d4dd9381bff5c2e954ae330fc15.zip
Fix version strings to work on windows & unix
Diffstat (limited to 'CMakeScripts/inkscape-version.cmake')
-rw-r--r--CMakeScripts/inkscape-version.cmake13
1 files changed, 6 insertions, 7 deletions
diff --git a/CMakeScripts/inkscape-version.cmake b/CMakeScripts/inkscape-version.cmake
index 12b8a26d8..9ffa7f8c7 100644
--- a/CMakeScripts/inkscape-version.cmake
+++ b/CMakeScripts/inkscape-version.cmake
@@ -14,19 +14,18 @@ set(INKSCAPE_CUSTOM "custom")
if(EXISTS ${INKSCAPE_SOURCE_DIR}/.git/)
execute_process(COMMAND git describe
- COMMAND tr "\n" " "
WORKING_DIRECTORY ${INKSCAPE_SOURCE_DIR}
- OUTPUT_VARIABLE INKSCAPE_REV1)
- execute_process(COMMAND git show --format=format:%ad --date=short
- COMMAND head -n 1
- COMMAND tr "\n" " "
+ OUTPUT_VARIABLE INKSCAPE_REV1
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND git log -n 1 --pretty=%ad --date=short
WORKING_DIRECTORY ${INKSCAPE_SOURCE_DIR}
- OUTPUT_VARIABLE INKSCAPE_REV2
+ OUTPUT_VARIABLE INKSCAPE_REV2
OUTPUT_STRIP_TRAILING_WHITESPACE)
- set(INKSCAPE_REVISION ${INKSCAPE_REV1} ${INKSCAPE_REV2})
+ set(INKSCAPE_REVISION "${INKSCAPE_REV1} ${INKSCAPE_REV2}")
execute_process(COMMAND
git status -s ${INKSCAPE_SOURCE_DIR}/src
+ WORKING_DIRECTORY ${INKSCAPE_SOURCE_DIR}
OUTPUT_VARIABLE INKSCAPE_SOURCE_MODIFIED
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT INKSCAPE_SOURCE_MODIFIED STREQUAL "")