From aec04da805fbffe097728fcef30cfc69c8562ad6 Mon Sep 17 00:00:00 2001 From: Herb Kuta Date: Wed, 5 Jun 2019 15:51:42 -0700 Subject: [PATCH] DRAFT {dashing} Add rosidl-generator-py-0.7.6-1.inc: Fix up installed .cmake to add include directory for numpy --- .../rosidl-python/rosidl-generator-py-0.7.6-1.inc | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 includes-ros2/rosidl-python/rosidl-generator-py-0.7.6-1.inc diff --git a/includes-ros2/rosidl-python/rosidl-generator-py-0.7.6-1.inc b/includes-ros2/rosidl-python/rosidl-generator-py-0.7.6-1.inc new file mode 100644 index 0000000..b611229 --- /dev/null +++ b/includes-ros2/rosidl-python/rosidl-generator-py-0.7.6-1.inc @@ -0,0 +1,13 @@ +# Copyright (c) 2019 LG Electronics, Inc. + +do_install_append() { + # - Add //numpy/core/include to the include file search path. XXX Why doesn't this need + # to be done under Ubuntu bionic? + # - HACK: Why can't I find a CMake variable containing the native sysroot that could be used instead of ${CMAKE_ROOT}/../..? + # - Use [{] and [}] to prevent bitbake from attempting to expand ${CMAKE_CURRENT_BINARY_DIR} in the regex. Can't use this + # trick in the substituted text, so instead, translate < > to { }. + sed -i -e '/target_include_directories([^)]*$/,/)/ { ; + s@\$[{]CMAKE_CURRENT_BINARY_DIR[}]/rosidl_generator_py@& $/../../$/numpy/core/include@ ; + y/<>/{}/ ; + }' ${D}${datadir}/${ROS_BPN}/cmake/rosidl_generator_py_generate_interfaces.cmake +}