Skip to content

Instantly share code, notes, and snippets.

@knwng
Created April 3, 2019 01:44
Show Gist options
  • Save knwng/174d8a13b95c799d0cecd6c5c65be4f0 to your computer and use it in GitHub Desktop.
Save knwng/174d8a13b95c799d0cecd6c5c65be4f0 to your computer and use it in GitHub Desktop.
compile librealsense on MacOS with Python bindings
# install dependencies
brew install libusb cmake pkg-config
git clone https://github.com/IntelRealSense/librealsense.git
cd librealsense
mkdir build
cd build
# cmake with python bindings
cmake -DBUILD_PYTHON_BINDINGS=bool:true ..
# add libusb's path to LIBRARY_PATH.
# the path may differ, you can use tools like locate to find the path containing libusb.xx.dylib
export LIBRARY_PATH=/usr/local/Cellar/libusb/1.0.22/lib:$LIBRARY_PATH
# compile the project
make -j4
# install binaries, static libs and dynamic libs system-wide
sudo make install
# check if the project is compiled and installed successfully
realsense-viewer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment