1 FIND_PROGRAM(GIT_EXECUTABLE NAMES git git.exe DOC "git command line client")
3 get_filename_component(SOURCE_DIR ${SRC} PATH)
6 COMMAND ${GIT_EXECUTABLE} svn info
7 COMMAND grep "Revision"
8 WORKING_DIRECTORY "${SOURCE_DIR}"
9 OUTPUT_VARIABLE VERSION
10 OUTPUT_STRIP_TRAILING_WHITESPACE
13 set( ${NAME} "unknown" )
16 FIND_PACKAGE(Subversion)
22 WORKING_DIRECTORY "${SOURCE_DIR}"
23 OUTPUT_VARIABLE VERSION
24 OUTPUT_STRIP_TRAILING_WHITESPACE
26 endif(Subversion_FOUND)
29 set( ${NAME} ${VERSION} )
32 string(REGEX REPLACE "Revision: " "" ${NAME} ${VERSION})
35 set(NAVIT_VARIANT "-")
37 message (STATUS "SVN-version ${${NAME}}")
38 CONFIGURE_FILE(${SRC} ${DST} @ONLY)