Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4430 from Vogtinator/gitfix
Browse files Browse the repository at this point in the history
cmake: Fix FindLibGit2.cmake with newer versions
  • Loading branch information
markus2330 authored Aug 12, 2022
2 parents d57703b + e4d085f commit 14d6500
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/news/_preparation_next_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ you up-to-date with the multi-language support provided by Elektra.

### CMake

- Fix build with newer libgit2 versions _(Fabian Vogt)_
- <<TODO>>
- <<TODO>>
- <<TODO>>
Expand Down
2 changes: 1 addition & 1 deletion scripts/cmake/Modules/FindLibGit2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ find_file (LibGit2_VERSION_HEADER NAMES git2/version.h)
if (NOT LibGit2_VERSION_HEADER STREQUAL LibGit2_VERSION_HEADER-NOTFOUND)
file (
STRINGS ${LibGit2_VERSION_HEADER} LibGit2_VERSION
REGEX "#define LIBGIT2_VERSION \".+\""
REGEX "#define LIBGIT2_VERSION[ \t]+\".+\""
LIMIT_COUNT 1)
string (REGEX REPLACE ".*\"(.+)\"" "\\1" LibGit2_VERSION ${LibGit2_VERSION})
endif (NOT LibGit2_VERSION_HEADER STREQUAL LibGit2_VERSION_HEADER-NOTFOUND)
Expand Down

0 comments on commit 14d6500

Please sign in to comment.