Skip to content

Commit

Permalink
Updated build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Lesches committed Dec 26, 2024
1 parent 912698a commit 3bbb088
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,22 @@ set -e # Any error will cause the script to fail
# See https://dev.intelrealsense.com/docs/compiling-librealsense-for-linux-ubuntu-guide

# Install dependencies
sudo apt-get install libssl-dev libusb-1.0-0-dev libudev-dev pkg-config libgtk-3-dev
sudo apt-get install git wget cmake build-essential
sudo apt-get install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev at
sudo apt-get install -y libssl-dev libusb-1.0-0-dev libudev-dev pkg-config libgtk-3-dev
sudo apt-get install -y git wget cmake build-essential
sudo apt-get install -y libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev at

# Build the RealSense SDK
cd librealsense
mkdir -p build
cd build
cmake .. -DFORCE_LIBUVC=true -DCMAKE_POSITION_INDEPENDENT_CODE=true -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true -DBUILD_GLSL_EXTENSIONS=true -DBUILD_TOOLS=true -DBUILD_WITH_OPENMP=true -DBUILD_SHARED_LIBS=true -DCMAKE_BUILD_TYPE=Release
make -j8
sudo make install
cd ../..
if [ ! -f /usr/local/lib/librealsense2.so ]
then
echo "Compiling RealSense SDK. This can take ~45 minutes..."
cd librealsense
mkdir -p build
cd build
cmake .. -DFORCE_LIBUVC=true -DCMAKE_POSITION_INDEPENDENT_CODE=true -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true -DBUILD_GLSL_EXTENSIONS=true -DBUILD_TOOLS=true -DBUILD_WITH_OPENMP=true -DBUILD_SHARED_LIBS=true -DCMAKE_BUILD_TYPE=Release
make -j8
sudo make install
cd ../..
fi

# Build our FFI wrappers
make clean
Expand Down

0 comments on commit 3bbb088

Please sign in to comment.