catkin.bbclass: add catkin configuration class

Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
This commit is contained in:
Stefan Herbrechtsmeier 2013-02-15 15:49:59 +01:00
parent ee91c908a5
commit c6837ecbf8
1 changed files with 49 additions and 0 deletions

49
classes/catkin.bbclass Normal file
View File

@ -0,0 +1,49 @@
#
# Copyright (c) 2013 Stefan Herbrechtsmeier, Bielefeld University
#
inherit cmake distutils-base
DEPENDS_prepend = "${@['catkin-native ', ''][d.getVar('BPN', True) == 'catkin']}"
EXTRA_OECMAKE_CATKIN = "\
-DCMAKE_PREFIX_PATH='${STAGING_DIR_HOST}/usr;${STAGING_DIR_NATIVE}/usr' \
"
EXTRA_OECMAKE_CATKIN_class-native = "\
-DCMAKE_PREFIX_PATH=${STAGING_DIR_NATIVE}/usr \
-DRT_LIBRARY=${libdir_native} \
"
EXTRA_OECMAKE_prepend = "\
${EXTRA_OECMAKE_CATKIN} \
-DCATKIN_BUILD_BINARY_PACKAGE=ON \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
"
export BUILD_SYS
export HOST_SYS
FILES_SOLIBSDEV = ""
FILES_${PN} += "${libdir}/lib*${SOLIBSDEV}"
ROS_BPN = "${@d.getVar('BPN', True).replace('-', '_')}"
ROS_BP = "${BPN}-${PV}"
FILES_${PN} += "\
${prefix}/etc \
${datadir}/${BPN}/conf \
${datadir}/${BPN}/scripts \
${datadir}/${ROS_BPN}/conf \
${datadir}/${ROS_BPN}/scripts \
"
FILES_${PN}-dev += "\
${datadir}/${BPN}/cmake \
${datadir}/${BPN}/package.xml \
${datadir}/${BPN}/*.template \
${datadir}/${ROS_BPN}/cmake \
${datadir}/${ROS_BPN}/package.xml \
${datadir}/${ROS_BPN}/*.template \
"