Skip to content

Commit 9462ea2

Browse files
committed
Merge branch 'betterdocs-macos'
* betterdocs-macos: Docs update: updated the macOS Package section deleted readme.md updating readme.md improving docs for macOS
2 parents f15edc7 + e89bfa0 commit 9462ea2

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Diff for: INSTALL.md

+23
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,29 @@ Get OpenCV from homebrew:
7373
--install`), XCode (from AppStore) or `llvm` (from Brew). You most probably need to also check the item 7 of the
7474
troubleshooting below.
7575

76+
If using system LLVM doesn't work for you you can get it from homebrew:
77+
```shell script
78+
brew install llvm
79+
```
80+
81+
If you have already installed OpenCV via Homebrew, there is no need to configure any environment variables specifically for OpenCV on macOS. The OpenCV installation can be automatically detected if it was installed through Homebrew.
82+
83+
To take advantage of this automatic detection, refrain from setting the following environment variables:
84+
85+
`OPENCV_LINK_LIBS`, `OPENCV_LINK_PATHS`, and `OPENCV_INCLUDE_PATHS`.
86+
87+
However, make sure you have configured the following environment variables:
88+
89+
`DYLD_FALLBACK_LIBRARY_PATH`, `LDFLAGS` and `LD_LIBRARY_PATH`.
90+
91+
If you have not made any custom changes to your installation, the following settings should work for your setup:
92+
93+
```
94+
export DYLD_FALLBACK_LIBRARY_PATH="$(xcode-select --print-path)/Toolchains/XcodeDefault.xctoolchain/usr/lib/"
95+
export LDFLAGS=-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
96+
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
97+
```
98+
7699
### Manual build
77100

78101
You can of course always compile OpenCV of the version you prefer manually. This is also supported, but it

0 commit comments

Comments
 (0)