26 | | {{{ |
27 | | $ git clone https://github.com/libgit2/libgit2.git |
28 | | $ cd libgit2 |
29 | | }}} |
30 | | Now set the `LIBGIT2` environment variable to the place you want to install `libgit2` (this environment variable is expected to be set by `pygit2`): |
31 | | {{{ |
32 | | $ export LIBGIT2=C:/Dev/libgit2-vc9 |
33 | | }}} |
34 | | if you live in a msysgit bash shell, |
35 | | or: |
36 | | {{{ |
37 | | > set LIBGIT2=C:/Dev/libgit2-vc9 |
38 | | }}} |
39 | | if you're forced to use a cmd.exe... |
40 | | |
41 | | Then download the [attachment:libgit2-msvc9.diff] patch, apply it, build and install `libgit2` like this: |
42 | | {{{ |
43 | | $ patch -p1 < libgit2-msvc9.diff |
44 | | $ mkdir build-msvc9 |
45 | | $ cd build-msvc9 |
46 | | $ cmake -G "Visual Studio 9 2008" .. -DCMAKE_INSTALL_PREFIX=$LIBGIT2 |
47 | | -- Check for working C compiler using: Visual Studio 9 2008 |
48 | | -- Check for working C compiler using: Visual Studio 9 2008 -- works |
49 | | -- Detecting C compiler ABI info |
50 | | -- Detecting C compiler ABI info - done |
51 | | -- Found PythonInterp: C:/Dev/Python272/python.exe (found version "2.7.2") |
52 | | -- Configuring done |
53 | | -- Generating done |
54 | | -- Build files have been written to: C:/Workspace/src/git/libgit2/build-msvc9 |
55 | | $ cmake --config Release --build . --target install |
56 | | }}} |
57 | | (replace `$LIBGIT2` with `%LIBGIT2%` if you're in a `cmd.exe`) |
| 26 | Follow the instructions given in this section: https://github.com/libgit2/pygit2#building-on-windows |