necsave: added NECSAVE software.

This commit is contained in:
Ricardo Martins 2015-11-03 13:09:29 +00:00 committed by Jose Pinto
parent b0c958ae59
commit de790486a2

View File

@ -0,0 +1,53 @@
version=\
(
'master'
)
requires=\
(
'cmake/host'
'dune/default'
)
download()
{
git clone "git@necsave.info:necsave/communications.git" source &&
cd source && git checkout "$version" && cd - &&
for r in duneplatform integration missionplanner perception vehicleplanner initialization; do
git clone "git@necsave.info:necsave/$r.git" "source/src/Modules/$r"
cd "source/src/Modules/$r" && git checkout "$version" && cd -
done
}
configure()
{
$cmd_mkdir build && cd build
PKG_CONFIG_PATH="$cfg_dir_toolchain_sysroot/usr/lib/pkgconfig" \
cmake \
-DCMAKE_INSTALL_PREFIX="$cfg_dir_toolchain_sysroot/usr/necsave" \
-DCMAKE_CXX_COMPILER="$cmd_target_cxx" \
-DCMAKE_C_COMPILER="$cmd_target_cc" \
-DCMAKE_FIND_ROOT_PATH:PATH="$cfg_dir_toolchain_sysroot/usr" \
-DDUNE_HOME="$cfg_dir_toolchain_sysroot/usr" \
-DCMAKE_SYSTEM_NAME:STRING=Linux \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE:STRING=BOTH \
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY:STRING=ONLY \
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM:STRING=BOTH \
../source
}
build()
{
$cmd_make -C build
}
host_install()
{
$cmd_make -C build install
}
target_install()
{
rm -rf "$cfg_dir_rootfs/usr/necsave" &&
$cmd_cp -r "$cfg_dir_toolchain_sysroot/usr/necsave" "$cfg_dir_rootfs/usr"
}