Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit ac72f91

Browse files
kumperastephentoub
authored andcommitted
Improve OSX build instructions (#26874)
* Improve OSX build instructions * Fix instructions to handle multiple installed openssl.
1 parent 6645300 commit ac72f91

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Documentation/building/unix-instructions.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,25 @@ ln -s /usr/local/opt/openssl/lib/pkgconfig/libssl.pc /usr/local/lib/pkgconfig/
102102
ln -s /usr/local/opt/openssl/lib/pkgconfig/openssl.pc /usr/local/lib/pkgconfig/
103103
```
104104

105+
Alternatively, to avoid modifying /usr/local/ you can invoke cmake with the `OPENSSL_ROOT_DIR` env var set. The value to be passed in the directory where openssl is installed. Use `brew info openssl` to determine it. For example:
106+
107+
```
108+
$brew info openssl
109+
openssl: stable 1.0.2l (bottled) [keg-only]
110+
SSL/TLS cryptography library
111+
https://openssl.org/
112+
/usr/local/Cellar/openssl/1.0.1f (1,229 files, 10.8MB)
113+
Poured from bottle on 2014-01-20 at 19:25:30
114+
/usr/local/Cellar/openssl/1.0.1g (1,229 files, 10.6MB)
115+
Poured from bottle on 2014-04-07 at 11:26:41
116+
```
117+
118+
With the above example, we'd pick the latest version `1.0.1g` and invoke cmake like the following:
119+
120+
```
121+
OPENSSL_ROOT_DIR="/usr/local/Cellar/openssl/1.0.1g cmake
122+
```
123+
105124
### Known Issues
106125
If you see errors along the lines of `SendFailure (Error writing headers)` you may need to import trusted root certificates:
107126

0 commit comments

Comments
 (0)