Skip to content

Building from source

You only need to build from source if you want to modify Hawkeye or run pre-release code. For everyday use, the Homebrew formula, .deb package, or Windows ZIP described in Installation is the faster path. For how those packages are produced and published, see Releasing.

INFO

Clone with --recursive. Hawkeye uses the MAVLink c_library_v2 as a submodule. If you forget and hit fatal: destination path 'c_library_v2' already exists and is not an empty directory, fix it with git submodule update --init.

macOS

sh
brew install cmake git
git clone --recursive https://github.com/PX4/Hawkeye.git
cd Hawkeye
make release

Linux (Debian/Ubuntu)

sh
sudo apt-get install -y cmake git build-essential \
  libgl1-mesa-dev libx11-dev libxrandr-dev \
  libxinerama-dev libxcursor-dev libxi-dev

git clone --recursive https://github.com/PX4/Hawkeye.git
cd Hawkeye
make release

Windows

Requires Visual Studio 2022 with the "Desktop development with C++" workload, CMake, and Git.

sh
git clone --recursive https://github.com/PX4/Hawkeye.git
cd Hawkeye
make release

Binary location

After a source build, the binary is at:

PlatformPath
macOSbuild/hawkeye
Linuxbuild/hawkeye
Windowsbuild\Release\hawkeye.exe

Makefile targets

TargetDescription
makeDebug build (default)
make releaseRelease build
make runBuild and launch the viewer
make testBuild and run all tests (see Testing)
make test-coreBuild and run core tests only (no raylib, fast CI path)
make sanitizeBuild with AddressSanitizer and UndefinedBehaviorSanitizer enabled
make cleanRemove the build directory

The BUILD_TYPE variable defaults to Debug; override with make BUILD_TYPE=Release or use the release target. Extra CMake flags can be passed via CMAKE_EXTRA.

Verifying the build

Launch the binary with no arguments:

sh
./build/hawkeye

A window opens with the default quadrotor model on a grid backdrop, waiting for MAVLink telemetry on UDP port 19410. If the window doesn't appear, see Troubleshooting.

Next steps

  • Testing — Running the ctest suite and sanitizer builds
  • First SITL run — Connect the built binary to PX4 SIH

Released under the BSD-3-Clause License. Privacy Policy.