summaryrefslogtreecommitdiffstats
path: root/CMakeScripts
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-06-30 15:46:07 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-06-30 15:46:07 +0000
commit1fb52a2072857602eb9777d38ee6aee556d27b4c (patch)
treef7722dc7f42e3f8181d7bb1a326753f8da6a8300 /CMakeScripts
parentStarting selectable knots (diff)
parentMerge branch 'master' of gitlab.com:inkscape/inkscape (diff)
downloadinkscape-1fb52a2072857602eb9777d38ee6aee556d27b4c.tar.gz
inkscape-1fb52a2072857602eb9777d38ee6aee556d27b4c.zip
Merge branch 'master' of https://gitlab.com/jabiertxof/inkscape into selectable-knots
Diffstat (limited to 'CMakeScripts')
-rw-r--r--CMakeScripts/inkscape-version.cmake20
1 files changed, 14 insertions, 6 deletions
diff --git a/CMakeScripts/inkscape-version.cmake b/CMakeScripts/inkscape-version.cmake
index 2e23925c4..12b8a26d8 100644
--- a/CMakeScripts/inkscape-version.cmake
+++ b/CMakeScripts/inkscape-version.cmake
@@ -11,14 +11,22 @@
set(INKSCAPE_REVISION "unknown")
set(INKSCAPE_CUSTOM "custom")
-if(EXISTS ${INKSCAPE_SOURCE_DIR}/.bzr/)
- execute_process(COMMAND
- bzr revno --tree ${INKSCAPE_SOURCE_DIR}
- OUTPUT_VARIABLE INKSCAPE_REVISION
- OUTPUT_STRIP_TRAILING_WHITESPACE)
+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" " "
+ WORKING_DIRECTORY ${INKSCAPE_SOURCE_DIR}
+ OUTPUT_VARIABLE INKSCAPE_REV2
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set(INKSCAPE_REVISION ${INKSCAPE_REV1} ${INKSCAPE_REV2})
execute_process(COMMAND
- bzr status -S -V ${INKSCAPE_SOURCE_DIR}/src
+ git status -s ${INKSCAPE_SOURCE_DIR}/src
OUTPUT_VARIABLE INKSCAPE_SOURCE_MODIFIED
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT INKSCAPE_SOURCE_MODIFIED STREQUAL "")