diff --git a/BUILD_INSTRUCTIONS.md b/BUILD_INSTRUCTIONS.md new file mode 100644 index 0000000000000000000000000000000000000000..a284f5e190b83097e7813b94b2e2ee76325e06a4 --- /dev/null +++ b/BUILD_INSTRUCTIONS.md @@ -0,0 +1,50 @@ +# Building the lib + +The following procedure has been written for Ubuntu 22.04 OS. + + +Install the dependencies : + +``` +./prepare_build.sh +``` + +## Building librealsense + +Clone the repository : + +``` +git clone https://github.com/IntelRealSense/librealsense.git +``` + + +Create the build directory and prepare the build + +``` +cd librealsense +mkdir build && cd build +cmake ../ +make +``` + +Once built, install the lib : + +``` +make install +``` + + +## Building lib sandbox + +Clone the repository (and checkout to the opencv4 branch) + +``` +git clone ssh://git@ssh.hesge.ch:10572/ar_sandbox/ar_sandbox_lib.git +git checkout opencv4 +``` + +Build the lib: + +``` +make all +``` \ No newline at end of file diff --git a/Prereqs.sh b/Prereqs.sh new file mode 100644 index 0000000000000000000000000000000000000000..796d6bb93590a2abdf686e8072d810139e640319 --- /dev/null +++ b/Prereqs.sh @@ -0,0 +1,4 @@ + +ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2 +cd /usr/lib/x86_64-linux-gnu/pkgconfig +ln -s opencv4.pc opencv.pc \ No newline at end of file diff --git a/prepare_build.sh b/prepare_build.sh new file mode 100755 index 0000000000000000000000000000000000000000..9bcd68107b1c6ca7b6574bcf2fecde07544a1cc1 --- /dev/null +++ b/prepare_build.sh @@ -0,0 +1,32 @@ +NC='\033[0m' # No Color +GRE='\033[0;32m' +BLU='\033[0;34m' +YEL='\033[0;33m' + + +echo "${BLU}========================================" +echo "= libsandbox requirements install =" +echo "========================================${NC}" + +echo "${YEL}Updating APT cache${NC}" +apt update + +echo "${BLU}========================================" +echo "= librealsense build requirements =" +echo "========================================${NC}" +apt install -y git wget cmake build-essential libssl-dev libusb-1.0-0-dev libudev-dev pkg-config libgtk-3-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev at v4l-utils + +echo "${BLU}========================================" +echo "= libsandbox build requirements =" +echo "========================================${NC}" +apt install -y libyaml-cpp-dev libopencv-dev qtbase5-dev qttools5-dev + +echo "${BLU}========================================" +echo "= Linking opencv4/opencv2 to opencv2 =" +echo "========================================${NC}" +ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2 +echo "${BLU}========================================" +echo "= Linking opencv4.pc to opencv.pc =" +echo "========================================${NC}" +ln -s /usr/lib/x86_64-linux-gnu/pkgconfig/opencv4.pc /usr/lib/x86_64-linux-gnu/pkgconfig/opencv.pc +echo "${GRE}Successfuly prepared environment${NC}" \ No newline at end of file