genmsg: Add patch to handle msg file relatively

Adapt genmsg to handle msg files relatively to the current
cmake path. Without this modification genmsg failed to generate
messages because it pass a path without sysroot to the python
code.

Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
This commit is contained in:
Stefan Herbrechtsmeier 2013-03-13 17:08:23 +01:00
parent fc3c29f5d8
commit 9e5d149573
2 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,22 @@
diff -Naur a/cmake/genmsg-extras.cmake.em b/cmake/genmsg-extras.cmake.em
--- a/cmake/genmsg-extras.cmake.em 2013-01-19 20:01:11.000000000 +0100
+++ b/cmake/genmsg-extras.cmake.em 2013-03-13 16:39:51.000000000 +0100
@@ -172,8 +172,7 @@
${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${PROJECT_NAME}-msg-paths.cmake
@@ONLY)
# generate and install config of message include dirs for project
- _prepend_path(${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME} "${${PROJECT_NAME}_MSG_INCLUDE_DIRS_INSTALLSPACE}" INCLUDE_DIRS_W_PATH)
- set(PKG_MSG_INCLUDE_DIRS "${INCLUDE_DIRS_W_PATH}")
+ set(PKG_MSG_INCLUDE_DIRS "${${PROJECT_NAME}_MSG_INCLUDE_DIRS_INSTALLSPACE}")
configure_file(
${genmsg_CMAKE_DIR}/pkg-msg-paths.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${PROJECT_NAME}-msg-paths.cmake
diff -Naur a/cmake/pkg-msg-paths.cmake.in b/cmake/pkg-msg-paths.cmake.in
--- a/cmake/pkg-msg-paths.cmake.in 2013-01-19 20:01:11.000000000 +0100
+++ b/cmake/pkg-msg-paths.cmake.in 2013-03-13 16:37:32.000000000 +0100
@@ -1,2 +1,5 @@
set(@PROJECT_NAME@_MSG_INCLUDE_DIRS @PKG_MSG_INCLUDE_DIRS@)
+if(NOT IS_ABSOLUTE ${@PROJECT_NAME@_MSG_INCLUDE_DIRS})
+ set(@PROJECT_NAME@_MSG_INCLUDE_DIRS ${@PROJECT_NAME@_DIR}/../${@PROJECT_NAME@_MSG_INCLUDE_DIRS})
+endif()
set(@PROJECT_NAME@_MSG_DEPENDENCIES @ARG_DEPENDENCIES@)

View File

@ -3,7 +3,10 @@ SECTION = "devel"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://package.xml;beginline=9;endline=9;md5=d566ef916e9dedc494f5f793a6690ba5"
SRC_URI = "https://github.com/ros/${BPN}/archive/${PV}.tar.gz;downloadfilename=${BP}.tar.gz"
SRC_URI = "https://github.com/ros/${BPN}/archive/${PV}.tar.gz;downloadfilename=${BP}.tar.gz \
file://0001-modify-msg-file-handling-to-reference-them-relatively.patch \
"
SRC_URI[md5sum] = "de385f1796bf025915ed7b20e1e1acc4"
SRC_URI[sha256sum] = "e510caa7692a4b0a0948688b9d2d8f6ff2f329980d7f78787276afec030806b7"