projects
/
platform
/
upstream
/
flatbuffers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
956d115
)
[CMake]: Fix version in pkgconfig file (#6986)
author
Biswapriyo Nath
<nathbappai@gmail.com>
Fri, 10 Dec 2021 23:40:21 +0000
(
05:10
+0530)
committer
GitHub
<noreply@github.com>
Fri, 10 Dec 2021 23:40:21 +0000
(15:40 -0800)
This change checks if the current source directory is a git repository.
If this is not checked the git command picks the commit hash from
parent directory. e.g. when tarball is extracted in a packaging repository.
CMake/Version.cmake
patch
|
blob
|
history
diff --git
a/CMake/Version.cmake
b/CMake/Version.cmake
index
526323d
..
147de5e
100644
(file)
--- a/
CMake/Version.cmake
+++ b/
CMake/Version.cmake
@@
-4,7
+4,7
@@
set(VERSION_PATCH 5)
set(VERSION_COMMIT 0)
find_program(GIT git)
-if(GIT)
+if(GIT
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git"
)
execute_process(
COMMAND ${GIT} describe --tags
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}