diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/version.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/version.cmake b/cmake/version.cmake index 798781560..4f9c6d017 100644 --- a/cmake/version.cmake +++ b/cmake/version.cmake @@ -1,9 +1,11 @@ FIND_PROGRAM(GIT_EXECUTABLE git DOC "git command line client") +get_filename_component(SOURCE_DIR ${SRC} PATH) + EXECUTE_PROCESS( COMMAND ${GIT_EXECUTABLE} svn info COMMAND grep "Revision" - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + WORKING_DIRECTORY "${SOURCE_DIR}" OUTPUT_VARIABLE VERSION OUTPUT_STRIP_TRAILING_WHITESPACE ) @@ -17,7 +19,7 @@ if (NOT VERSION) EXECUTE_PROCESS( COMMAND svnversion - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + WORKING_DIRECTORY "${SOURCE_DIR}" OUTPUT_VARIABLE VERSION OUTPUT_STRIP_TRAILING_WHITESPACE ) |