[buildout]
extends =
  ../../component/mavsdk/buildout.cfg
  software-peer-base.cfg


[c-astral-xml-definition]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/c-astral-c-library.git
revision = v2.1
git-executable = ${git:location}/bin/git

[mavsdk]
pre-configure +=
  sed -i 's#message_definitions/v1.0#${c-astral-xml-definition:location}#' ${mavsdk-source:location}/third_party/mavlink/CMakeLists.txt

[c-astral-wrapper]
recipe = slapos.recipe.cmmi
configure-command = true
url = https://lab.nexedi.com/nexedi/c-astral-wrapper/-/archive/v2.1/c-astral-wrapper-v2.1.tar.gz
md5sum = cca66724e1b7a61c1b9559fde95c420b
environment =
  CPLUS_INCLUDE_PATH=${qjs-wrapper-source:location}/include:${mavsdk:location}/include:${mavsdk:location}/include/mavsdk
  LDFLAGS=-L${mavsdk:location}/lib -Wl,-rpath=${mavsdk:location}/lib

[qjs-wrapper]
autopilot-wrapper = ${c-astral-wrapper:location}
make-options = WITH_AUTOPILOT=y
