Skip to content

Commit

Permalink
Run git in source tree, not build tree. Fixes bug #4086.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandro Santilli authored and jef-n committed Jul 14, 2011
1 parent 86acc7d commit 98562b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Expand Up @@ -438,7 +438,10 @@ IF (GIT_MARKER)
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
ELSE(MSVC)
EXECUTE_PROCESS(COMMAND ${GIT} log -n1 --pretty=%h OUTPUT_VARIABLE REVISION)
EXECUTE_PROCESS(
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${GIT} log -n1 --pretty=%h OUTPUT_VARIABLE REVISION
)
STRING(STRIP "${REVISION}" REVISION)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h
Expand Down

0 comments on commit 98562b3

Please sign in to comment.