Skip to content

Commit

Permalink
Merge pull request #3425 from yousseb/osx-docs
Browse files Browse the repository at this point in the history
Update installation_osx.md
  • Loading branch information
dorodnic committed Mar 9, 2019
2 parents bcc71f3 + e9ae075 commit 8e2e977
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions doc/installation_osx.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,34 @@

## Building from Source

1. Install XCode 6.0+ via the AppStore
1. Install CommantLineTools `sudo xcode-select` or download XCode 6.0+ via the AppStore
2. Install the Homebrew package manager via terminal - [link](http://brew.sh/)
3. Install the following packages via brew:
* `brew install libusb pkg-config`
* `brew install homebrew/core/glfw3`
* `brew install cmake`
* `brew install cmake libusb pkg-config`
* `brew cask install vulkan-sdk`

**Note** *librealsense* requires CMake version 3.8+ that can be obtained via the [official CMake site](https://cmake.org/download/).
**Note** *librealsense* requires CMake version 3.8+ that can also be obtained via the [official CMake site](https://cmake.org/download/).


4. Generate XCode project:
* `mkdir build && cd build`
* `sudo xcode-select --reset`
* `cmake .. -DBUILD_EXAMPLES=true -DBUILD_WITH_OPENMP=false -DHWM_OVER_XU=false -G Xcode`
5. Open and build the XCode project
5. Build the Project
* `make -j`

> **Note:** On some Mac systems you might encounter `ld: library not found for -lusb-1.0` error (either in the terminal during make or in XCode) This can be worked-around by setting environment variable: `/bin/launchctl setenv LIBRARY_PATH /usr/local/lib`
## What works?
* SR300, D415 and D435 will stream depth, infrared and color at all supported resolutions
* The Viewer, Depth-Quality Tool and most of the examples should work

## Packaging your application
1. librealsense requires libusb to be bundled in the application. To fix the real-time linking, use `install_name_tool`
```
install_name_tool -change /usr/local/opt/libusb/lib/libusb-1.0.0.dylib @rpath/libusb-1.0.0.dylib librealsense2.dylib
```
2. Copy `libusb-1.0.0.dylib` and `librealsense2.dylib` to your application's `Frameworks` folder

## What are the known issues?
* Changing configurations will often result in a crash or the new configuration not being applied (WIP)

0 comments on commit 8e2e977

Please sign in to comment.