summaryrefslogtreecommitdiff
path: root/muse2/CMakeLists.txt
diff options
context:
space:
mode:
authorOrcan Ogetbil <oget.fedora@gmail.com>2013-09-02 13:33:18 -0400
committerOrcan Ogetbil <oget.fedora@gmail.com>2013-09-02 13:33:18 -0400
commitb05fdd7bd212cf664eb64ec292936f1843a400f5 (patch)
tree406db9154dbe508b15404c3bb7f65b448d30ad12 /muse2/CMakeLists.txt
parent9d08fbdd3ee0e41dd6d13206a31043b72684ada4 (diff)
About box displays the git string and year 2013
Diffstat (limited to 'muse2/CMakeLists.txt')
-rw-r--r--muse2/CMakeLists.txt24
1 files changed, 16 insertions, 8 deletions
diff --git a/muse2/CMakeLists.txt b/muse2/CMakeLists.txt
index f417347a..66a2ea1b 100644
--- a/muse2/CMakeLists.txt
+++ b/muse2/CMakeLists.txt
@@ -109,14 +109,22 @@ SET(MusE_SHARE_DIR ${SHARE_INSTALL_PREFIX}/${MusE_INSTALL_NAME})
## Lib directory
SET(MusE_LIB_DIR ${LIB_INSTALL_DIR}/${MusE_INSTALL_NAME})
-FIND_PROGRAM(SVNVER svnversion)
-if (${SVNVER} STREQUAL "SVNVER-NOTFOUND")
- SET (MusE_SVNVER 0)
-else (${SVNVER} STREQUAL "SVNVER-NOTFOUND")
- EXEC_PROGRAM( svnversion
- ARGS ${PROJECT_SOURCE_DIR}
- OUTPUT_VARIABLE MusE_SVNVER )
-endif (${SVNVER} STREQUAL "SVNVER-NOTFOUND")
+include(FindGit)
+if (GIT_FOUND)
+ EXEC_PROGRAM( ${GIT_EXECUTABLE}
+ ARGS "log -1 --format='%ci'"
+ OUTPUT_VARIABLE MusE_GITDATE )
+ EXEC_PROGRAM( ${GIT_EXECUTABLE}
+ ARGS "log -1 --format='%t'"
+ OUTPUT_VARIABLE MusE_GITHASH )
+ EXEC_PROGRAM( ${GIT_EXECUTABLE}
+ ARGS "rev-parse --abbrev-ref HEAD"
+ OUTPUT_VARIABLE MusE_GITBRANCH )
+ SET(MusE_GITSTRING "git: ${MusE_GITBRANCH} - ${MusE_GITHASH} - ${MusE_GITDATE}")
+else (GIT_FOUND)
+ SET(MusE_GITSTRING "")
+endif (GIT_FOUND)
+
option ( ENABLE_LASH "Enable LASH Audio Session Handler (or LADISH compatibility layer)" ON)
option ( ENABLE_OSC "Enable Lightweight Open Sound Control (liblo) (DSSI also recommended)" ON)