Skip to content

Latest commit

 

History

History
134 lines (109 loc) · 3.28 KB

linux_build_instructions.md

File metadata and controls

134 lines (109 loc) · 3.28 KB

Linux Build Instructions

Note, all actities below are assuming to be done in a base folder. Where the libs, and its contents, folder is called out.

base folder
├── glog
├── libs
│   ├── libtofi_compute.so
│   ├── libtofi_config.so
│   ├── tofi_compute_depth
│   └── tofi_processor.obj
├── libwebsockets
├── protobuf
└── ToF

You can use the evaluation folder as a reference by over writing the files with the executables and binaries built.

The following variables must be exported for execution of the examples:

export OverrideDefaultFP64Settings=1
export IGC_EnableDPEmulation=1 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.

Building the SDK only

Download the latest Linux installer - as of writing v4.1.1. https://github.com/analogdevicesinc/ToF/releases

  • mkdir libs
  • cd libs
  • cp ~/Analog\ Devices/TOF_Evaluation_ADTF3175D-Ubuntu22.04-Rel4.1.1/bin/*tofi* .

Pre-requisites

  • CMake
  • OpenGL
  • Glog v0.6.0
  • Libwebsockets v3.1
  • Protocol Buffers v3.9.0

Installing the dependencies

  • CMake:
sudo apt install cmake
  • OpenGL:
sudo apt install libgl1-mesa-dev libglfw3-dev
  • Glog:
git clone --branch v0.6.0 --depth 1 https://github.com/google/glog
cd glog
mkdir build_0_6_0 && cd build_0_6_0
cmake -DWITH_GFLAGS=off -DCMAKE_INSTALL_PREFIX=/opt/glog ..
sudo cmake --build . --target install
  • Libwebsockets:
git clone --branch v3.1-stable --depth 1 https://github.com/warmcat/libwebsockets
cd libwebsockets
mkdir build_3_1 && cd build_3_1
cmake -DLWS_WITH_SSL=OFF -DLWS_STATIC_PIC=ON -DCMAKE_INSTALL_PREFIX=/opt/websockets ..
sudo cmake --build . --target install
  • protobuf:
git clone --branch v3.9.0 --depth 1 https://github.com/protocolbuffers/protobuf
cd protobuf
mkdir build_3_9_0 && cd build_3_9_0
cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=/opt/protobuf ../cmake
sudo cmake --build . --target install

Download and build SDK only

git clone --branch v4.1.1 --depth 1 https://github.com/analogdevicesinc/ToF
cd ToF
mkdir build && cd build
cmake -DWITH_EXAMPLES=off -DWITH_NETWORK=on -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" ..
make

SDK with examples

Additional pre-requisites

  • OpenCV

Installing the additional dependencies

  • OpenCV:
sudo apt install libopencv-contrib-dev
sudo apt install libopencv-dev

Build SDK with examples

git clone --branch v4.1.1 --depth 1 https://github.com/analogdevicesinc/ToF
cd ToF
mkdir build && cd build
cmake -DWITH_EXAMPLES=on -DWITH_NETWORK=on -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets" ..
make

SDK with bindings

Generate doxygen documentation

Requirements:

  • Doxygen
  • Graphviz
sudo apt-get install doxygen graphviz

In order to generate the doxygen documentation you must compile the sdk in the following way:

cmake -DCMAKE_PREFIX_PATH="/opt/glog;/opt/protobuf;/opt/websockets;/opt/opencv" -DWITH_DOC=on ..
make -j4 doc

After compilation, the documentation can be found at this path:

build/doc/doxygen_doc/html/index.html