mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 09:51:29 +00:00
cmake: run git in the source directory
This commit is contained in:
parent
ec013d1f1a
commit
8e8bdbcae2
|
@ -15,11 +15,13 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
|
|||
COMMAND git describe --always
|
||||
OUTPUT_VARIABLE GIT_COMMIT_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
execute_process(
|
||||
COMMAND git rev-parse --abbrev-ref HEAD
|
||||
OUTPUT_VARIABLE GIT_BRANCH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
|
||||
|
||||
|
|
Loading…
Reference in a new issue