libgit2/objective-git — pull request #52 by rowanj (2011-12-25 08:07:16+00:00)
Title: Build libgit2 as a static library target of objective-git

Build `libgit2.a` as a static library target of `ObjectiveGitFramework.xcodeproj` with a shell-script build stage via CMake.

This introduces the build-time dependencies of libgit2 (CMake + unix development environment, by default) but has the benefits of:

* Doesn't require `libgit2.a` to be comitted to the repository
* Rebuilds `libgit2.a` when updated sources are present (or after a 'clean'); good for frequent tracking of upstream repos
* Build configuration of `libgit2.a` as used can be viewed and modified
* Doesn't need the `ObjectiveGitFramework` project file to be upgraded when `libgit2` sources are added or renamed, as the upstream build system is used
* Interoperates transparently with Xcode project 'target dependencies' and 'link binary with libraries' build stages. Good for when the host project also wants to use `libgit2` directly.
* Runs the `libgit2_test` suite when a new library is built, before it is copied

Notes:

* this approach could be trivially converted to build a shared (`*.dylib`) library
* this introduces build-time dependency on CMake
* CMake's Makefile generator depends on a working unix dev environment