intel / mavlink-vehicles

A Mavlink wrapper dedicated to the most common messages that are exchanged between an air vehicle and a ground station
Apache License 2.0
6 stars 9 forks source link

Build: Add support to Yocto SDK #44

Closed mbelluzzo closed 7 years ago

mbelluzzo commented 7 years ago

This patch add support to the Yocto SDK by properly passing sysroot information to build the project.

Sadly, besides what is said in CMake documentation, FindPkgConfig don't deal very well with "CMAKE_FIND_ROOT_PATH" + "CMAKE_PREFIXPATH" combo. Luckily for us, find*() commands does (from 3.1 onwards)!

So now MavLink is found by find_path(), taking advantage of the fact that its headers only library.

Now, to cross-compile this project against a system that doesn't provide Mavlink headers, one just have to set CMAKE_PREFIX_PATH to where those headers can be found.

rchiossi commented 7 years ago

lgtm.