MAVSDK Installation on Ubuntu 18.04 build problem

Hi for all,

I have just downloaded the package of mavsdk for ubuntu 18 to install from here. But during building example of takeoff and landing, it causes an error saying that:

metin@metin-Lenovo-V330-15IKB:~/MAVSDK/examples/takeoff_and_land$ cmake --build build -j4
Unknown argument -j4
Usage: cmake --build <dir> [options] [-- [native-options]]
Options:
  <dir>          = Project binary directory to be built.
  --target <tgt> = Build <tgt> instead of default targets.
                   May only be specified once.
  --config <cfg> = For multi-configuration tools, choose <cfg>.
  --clean-first  = Build target 'clean' first, then build.
                   (To clean only, use --target 'clean'.)
  --use-stderr   = Ignored.  Behavior is default in CMake >= 3.0.
  --             = Pass remaining options to the native tool.

What should I do?

Note: I wass following this tutorials from MAVSDK: QuickStart · MAVSDK Guide

Maybe stupid but did you try to build without the argument “-j4” ?

Hi Smark2019,

this may also indicate that you are using an outdated CMake version. (You can try “cmake --version”.)
I remember I ran into a similar problem when installing on Ubuntu 18.04.

Also note that the CMakeLists.txt in takeoff_and_land says
cmake_minimum_required(VERSION 3.10.2)

Cheers,
Björn