2013-02-15 22:49:59 +08:00
|
|
|
#
|
|
|
|
# Copyright (c) 2013 Stefan Herbrechtsmeier, Bielefeld University
|
|
|
|
#
|
|
|
|
|
2014-05-30 14:06:31 +08:00
|
|
|
inherit cmake distutils-base ros faulty-solibs
|
2013-02-15 22:49:59 +08:00
|
|
|
|
catkin: split up catkin in order to reduce runtime dependencies
The catkin package has got a runtime dependency to cmake, make,
gcc and other build utilities. These dependencies, however, are
only needed if it is desired to build with catkin on the target
board. If we do not want to build on the target board, i.e., if
we just want to use ros tools like roslaunch, only a small part
of catkin (i.e., the corresponding python packages) is required
to be deployed on the target board.
Therefore, we introduce a new package called catkin-runtime.
It installs only the python packages that are required for
the ros tools to run. The roslib package now depends on
catkin-runtime (previously: catkin).
I also tried an alternative approach which just modifies catkin.bb:
- add a catkin-runtime package
- move PYTHON_SITEPACKAGES_DIR from FILES_catkin to FILES_CATKIN_RUNTIME
- make catkin_runtime RDEPEND on the python stuff
- make catkin RDEPEND on the cmake, binutils, ..., + catkin-runtime
With this setup, for some reason, bitbake thinks that
catkin-runtime still RDEPENDS on binutils. Therefore, I split up
the catkin recipe into two different recipes. Here, the
RDEPENDS are managed correctly.
If we want to deploy catkin as a build tool on the board, we can
simply add a runtime dependency to catkin. However, this should
not be the default setup.
Special thanks go to Tobias Henkel (tobias.henkel@bmw-carit.de)
who deserves most of the credits for this patch.
Signed-off-by: Andreas Baak <andreas.baak@bmw-carit.de>
2015-03-02 19:59:52 +08:00
|
|
|
DEPENDS_prepend = "${@['catkin-native ', ''][(d.getVar('BPN', True) == 'catkin') | (d.getVar('BPN', True) == 'catkin-runtime')]}"
|
2013-02-15 22:49:59 +08:00
|
|
|
|
|
|
|
EXTRA_OECMAKE_CATKIN = "\
|
2014-08-15 03:29:02 +08:00
|
|
|
-DCMAKE_PREFIX_PATH='${STAGING_DIR_HOST}${ros_prefix};${STAGING_DIR_HOST}${prefix};${STAGING_DIR_NATIVE}${ros_prefix};${STAGING_DIR_NATIVE}${prefix}' \
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH='${ros_prefix}' \
|
2013-02-15 22:49:59 +08:00
|
|
|
"
|
|
|
|
|
|
|
|
EXTRA_OECMAKE_CATKIN_class-native = "\
|
2014-08-15 03:29:02 +08:00
|
|
|
-DCMAKE_PREFIX_PATH='${ros_prefix}' \
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH='${ros_prefix}' \
|
2013-02-15 22:49:59 +08:00
|
|
|
-DRT_LIBRARY=${libdir_native} \
|
|
|
|
"
|
|
|
|
|
|
|
|
EXTRA_OECMAKE_prepend = "\
|
|
|
|
${EXTRA_OECMAKE_CATKIN} \
|
|
|
|
-DCATKIN_BUILD_BINARY_PACKAGE=ON \
|
|
|
|
-DSETUPTOOLS_DEB_LAYOUT=OFF \
|
2013-07-03 13:50:57 +08:00
|
|
|
-DCATKIN_ENABLE_TESTING=0 \
|
2013-02-15 22:49:59 +08:00
|
|
|
"
|
|
|
|
|
2013-02-28 17:23:19 +08:00
|
|
|
OECMAKE_SOURCEPATH = "${S}"
|
|
|
|
OECMAKE_BUILDPATH = "${S}/build"
|
|
|
|
|
2013-02-15 22:49:59 +08:00
|
|
|
export BUILD_SYS
|
|
|
|
export HOST_SYS
|
|
|
|
|
2013-04-04 16:45:46 +08:00
|
|
|
SYSROOT_PREPROCESS_FUNCS += "catkin_sysroot_preprocess"
|
|
|
|
catkin_sysroot_preprocess () {
|
2014-08-15 03:29:02 +08:00
|
|
|
sysroot_stage_dir ${D}${ros_sysconfdir} ${SYSROOT_DESTDIR}${ros_sysconfdir}
|
2013-04-04 16:45:46 +08:00
|
|
|
}
|