SUMMARY The FindLibGit2 module queries pkgconfig for the "git2" module. The actual module is called "libgit2", at least on Kde Neon and Fedora 40. This can be verified by checking the name of the ".pc" file. STEPS TO REPRODUCE 1. Use FindLibGit2 with a custom build of libgit2, not in the system library path 2. Provide the correct path to pkg-config by setting CMAKE_PREFIX_PATH appropriately 3. find_package(LibGit2) fails to find libgit2 4. Change the module name to "libgit2" in FindLibGit2.cmake 5. find_package(LibGit2) finds libgit2 correctly OBSERVED RESULT find_package(LibGit2) cannot find the custom libgit2. EXPECTED RESULT find_package(LibGit2) finds the custom libgit2. SOFTWARE/OS VERSIONS Linux: Custom environment used by the CMS Experiment at CERN KDE Frameworks Version: Find module copied from current master
Git commit a0fa560da8fb194aced9018304b63a1defae26a3 by Nicolas Fella, on behalf of Louis Moureaux. Committed on 23/12/2023 at 01:44. Pushed by nicolasfella into branch 'master'. Fixes to FindLibGit2.cmake * Correct the name of the pkg-config module * Correct the version regex to work with libgit2 1.7.1 M +6 -5 find-modules/FindLibGit2.cmake https://invent.kde.org/frameworks/extra-cmake-modules/-/commit/a0fa560da8fb194aced9018304b63a1defae26a3
Git commit 97fdb28ff73cc4213e8a26099e68bbc88fd23188 by Nicolas Fella, on behalf of Louis Moureaux. Committed on 23/12/2023 at 01:45. Pushed by nicolasfella into branch 'kf5'. Fixes to FindLibGit2.cmake * Correct the name of the pkg-config module * Correct the version regex to work with libgit2 1.7.1 (cherry picked from commit a0fa560da8fb194aced9018304b63a1defae26a3) M +6 -5 find-modules/FindLibGit2.cmake https://invent.kde.org/frameworks/extra-cmake-modules/-/commit/97fdb28ff73cc4213e8a26099e68bbc88fd23188