Skip to content

Commit

Permalink
Merge pull request rust-lang#141 from cristianoliveira/patch-1
Browse files Browse the repository at this point in the history
Adding build note for OS X
  • Loading branch information
alexcrichton committed May 16, 2016
2 parents 166e453 + fdd87ad commit 0b07832
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,27 @@ $ cd git2-rs
$ cargo build
```

## Building on OSX 10.10+

Currently libssh2 requires linking against OpenSSL, and to compile libssh2 it
also needs to find the OpenSSL headers. On OSX 10.10+ the OpenSSL headers have
been removed, but if you're using Homebrew you can install them via:

```sh
brew install openssl
```

To get this library to pick them up the [standard `rust-openssl`
instructions][instr] can be used to transitively inform libssh2-sys about where
the header files are:

[instr]: https://github.com/sfackler/rust-openssl#osx

```sh
export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include
export OPENSSL_LIB_DIR=`brew --prefix openssl`/lib
```

# License

`git2-rs` is primarily distributed under the terms of both the MIT license and
Expand Down

0 comments on commit 0b07832

Please sign in to comment.