catkin: add support for SDK
This commit is contained in:
parent
bc89dbf4ea
commit
9f6f30d174
|
@ -12,4 +12,4 @@ inherit pypi
|
||||||
RDEPENDS_${PN} = "${PYTHON_PN}-unixadmin"
|
RDEPENDS_${PN} = "${PYTHON_PN}-unixadmin"
|
||||||
RDEPENDS_${PN}_class-native = ""
|
RDEPENDS_${PN}_class-native = ""
|
||||||
|
|
||||||
BBCLASSEXTEND = "native"
|
BBCLASSEXTEND = "native nativesdk"
|
||||||
|
|
|
@ -10,4 +10,4 @@ SRC_URI[sha256sum] = "99f016af2770c48ab57a65df7aae251360dc69a1514c15851458a71d4d
|
||||||
|
|
||||||
S = "${WORKDIR}/${SRCNAME}-${PV}"
|
S = "${WORKDIR}/${SRCNAME}-${PV}"
|
||||||
|
|
||||||
BBCLASSEXTEND = "native"
|
BBCLASSEXTEND = "native nativesdk"
|
||||||
|
|
|
@ -32,8 +32,22 @@ do_install_append() {
|
||||||
touch ${D}${ros_prefix}/.catkin
|
touch ${D}${ros_prefix}/.catkin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Append environment hook for SDK
|
||||||
|
do_install_append_class-nativesdk() {
|
||||||
|
mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
|
||||||
|
|
||||||
|
script=${D}${SDKPATHNATIVE}/environment-setup.d/catkin-runtime.sh
|
||||||
|
echo "export ROSDISTRO=${ROSDISTRO}" >> $script
|
||||||
|
echo "export PATH=\$PATH:\${OECORE_NATIVE_SYSROOT}/opt/ros/\${ROSDISTRO}/bin" >> $script
|
||||||
|
echo "export PYTHONPATH=\${OECORE_NATIVE_SYSROOT}/opt/ros/\${ROSDISTRO}/lib/python2.7/site-packages" >> $script
|
||||||
|
echo "export ROS_ROOT=\${OECORE_TARGET_SYSROOT}/opt/ros/\${ROSDISTRO}/share/ros" >> $script
|
||||||
|
echo "export CMAKE_PREFIX_PATH=\${OECORE_TARGET_SYSROOT}/opt/ros/\${ROSDISTRO}:\${OECORE_NATIVE_SYSROOT}/opt/ros/${ROSDISTRO}" >> $script
|
||||||
|
}
|
||||||
|
|
||||||
|
FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}"
|
||||||
|
|
||||||
catkin_sysroot_preprocess_append() {
|
catkin_sysroot_preprocess_append() {
|
||||||
install -m 644 -t ${SYSROOT_DESTDIR}${ros_prefix} ${D}${ros_prefix}/.catkin
|
install -m 644 -t ${SYSROOT_DESTDIR}${ros_prefix} ${D}${ros_prefix}/.catkin
|
||||||
}
|
}
|
||||||
|
|
||||||
BBCLASSEXTEND += "native"
|
BBCLASSEXTEND += "native nativesdk"
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
require catkin.inc
|
require catkin.inc
|
||||||
|
|
||||||
|
SRC_URI += "file://environment.d-catkin.sh"
|
||||||
|
|
||||||
DEPENDS_class-native += "catkin-runtime"
|
DEPENDS_class-native += "catkin-runtime"
|
||||||
|
|
||||||
# The files in ${PYTHON_SITEPACKAGES_DIR} and catkin_find are
|
# The files in ${PYTHON_SITEPACKAGES_DIR} and catkin_find are
|
||||||
|
@ -27,4 +29,12 @@ do_install_append() {
|
||||||
rmdir ${D}${ros_libdir}/${PYTHON_DIR}
|
rmdir ${D}${ros_libdir}/${PYTHON_DIR}
|
||||||
}
|
}
|
||||||
|
|
||||||
BBCLASSEXTEND += "native"
|
# Append environment hook for SDK
|
||||||
|
do_install_append_class-nativesdk() {
|
||||||
|
mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
|
||||||
|
install -m 644 ${WORKDIR}/environment.d-catkin.sh ${D}${SDKPATHNATIVE}/environment-setup.d/catkin.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}"
|
||||||
|
|
||||||
|
BBCLASSEXTEND += "native nativesdk"
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
alias catkin_make=" \
|
||||||
|
catkin_make \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake \
|
||||||
|
-DSETUPTOOLS_DEB_LAYOUT=OFF \
|
||||||
|
"
|
||||||
|
alias catkin_make_isolated=" \
|
||||||
|
catkin_make_isolated \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake \
|
||||||
|
-DSETUPTOOLS_DEB_LAYOUT=OFF \
|
||||||
|
"
|
Loading…
Reference in New Issue