Installing ifm3d from source
Note: Following Instruction are for ifm3d-v1.6.0 and above which provide full support for O3R, O3D and O3X devices.
Overview of the available build flags
Flag name |
Description |
Default value |
---|---|---|
|
Build the |
ON |
|
Build the command-line utility |
ON |
|
Build the |
ON |
|
Build the ifm3dpy Python package (it can also be installed directly through |
OFF |
|
Build the |
ON |
|
Build the |
OFF |
|
Build install packages for development purposes |
ON |
|
Build modules as shared libraries |
ON |
|
Build the examples |
OFF |
|
Build documentation |
OFF |
Build Dependencies
The ifm3d library depends on the libraries listed below. Only CMake and pybind11 (if building the Python library) need to be installed on the user’s machine. The other dependencies will be pulled automatically.
Dependency |
Dependent ifm3d module |
Notes |
---|---|---|
CMake |
|
Meta-build framework |
Building From Source
Start with cloning the code from the ifm3d GitHub repository here.
⚠ The code on the branch main is updated nightly and contains the latest changes to the library. It is typically a work in progress.
⚠ We recommend using tagged versions for your builds, to ensure consistency between builds. The latest tagged version can be found here.
The default build
By default, the ifm3d
build enables the device
, framegrabber
, deserializer
, swupdater
,
and tools
modules. Building the software follows the usual CMake idiom of:
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
$ cmake --build .
$ sudo cmake --build . --target install
This will build and install ifm3d along with its dependencies.
Note: you can speed up the build by using
ninja
, withcmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr ..
.
Build Debian packages from source
To build debs to be distributed to multiple runtime machines, you can use the following:
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
$ cmake --build .
$ cmake --build . --target package
$ sudo dpkg -i ifm3d_*_amd64.deb
(The version number embedded in the deb file will be dependent upon which
version of the ifm3d
software you are building)