Skip to content
Snippets Groups Projects
Commit 92941b60 authored by Anthony Mallet's avatar Anthony Mallet
Browse files

[wip/ros-genmsg] Add a small patch needed for actionlib generated .msg

actionlib generated messages are in "build" directory. Without the patch, the
cmake rules for message generation would install those generated .msg under a
wrong path.

Simply add an optional parameter to add_message_file() and add_service_file()
that allows to specify both the source and destination dir of input files,
instead of considering they are the same. This is only used by actionlib and
has no side effect on other packages.
parent 40eca7e4
No related branches found
No related tags found
No related merge requests found
SHA1 (ros-fuerte-genmsg_0.3.10.orig.tar.gz) = 5a94a60e2aebc16bc938d0ec7792fb25e0ce2568
RMD160 (ros-fuerte-genmsg_0.3.10.orig.tar.gz) = 63d7f7eebfb92498dc1ee84f1acca0d610ae2f17
Size (ros-fuerte-genmsg_0.3.10.orig.tar.gz) = 55400 bytes
SHA1 (patch-aa) = dd193db60273203221cec84a8d87b14126e39d59
Add an extrac DST argument to add_{message,service}_files, for actionlib
generated messages, otherwise actionlib message are installed with the full
source path of the build directory under CMAKE_INSTALL_PREFIX.
--- cmake/genmsg-extras.cmake.in~ 2012-06-04 23:47:14.000000000 +0200
+++ cmake/genmsg-extras.cmake.in 2012-10-09 18:17:22.081648856 +0200
@@ -26,13 +26,17 @@
endmacro()
macro(add_message_files)
- parse_arguments(ARG "PACKAGE;FILES;DIRECTORY" "NOINSTALL;PRIVATE" ${ARGN})
+ parse_arguments(ARG "PACKAGE;FILES;DIRECTORY;DST" "NOINSTALL;PRIVATE" ${ARGN})
check_unused_arguments("add_message_files" "${ARG_DEFAULT_ARGS}")
if(NOT ARG_PACKAGE)
set(ARG_PACKAGE ${PROJECT_NAME})
endif()
+ if(NOT ARG_DST)
+ set(ARG_DST ${ARG_DIRECTORY})
+ endif()
+
string(REGEX MATCH "^/.*" IS_FULL_PATH ${ARG_DIRECTORY})
if(IS_FULL_PATH)
@@ -52,18 +56,21 @@
list(APPEND ${PROJECT_NAME}_MESSAGE_FILES_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_DIRECTORY})
if(NOT ARG_NOINSTALL)
- install(FILES ${FILES_W_PATH} DESTINATION share/${PROJECT_NAME}/${ARG_DIRECTORY})
+ install(FILES ${FILES_W_PATH} DESTINATION share/${PROJECT_NAME}/${ARG_DST})
endif()
endmacro()
macro(add_service_files)
- parse_arguments(ARG "PACKAGE;FILES;DIRECTORY" "NOINSTALL" ${ARGN})
+ parse_arguments(ARG "PACKAGE;FILES;DIRECTORY;DST" "NOINSTALL" ${ARGN})
check_unused_arguments("add_service_files" "${ARG_DEFAULT_ARGS}")
if(NOT ARG_PACKAGE)
set(ARG_PACKAGE ${PROJECT_NAME})
endif()
+ if(NOT ARG_DST)
+ set(ARG_DST ${ARG_DIRECTORY})
+ endif()
string(REGEX MATCH "^/.*" IS_FULL_PATH ${ARG_DIRECTORY})
@@ -78,7 +85,7 @@
list(APPEND ${PROJECT_NAME}_SERVICE_FILES ${FILES_W_PATH})
if(NOT ARG_NOINSTALL)
- install(FILES ${FILES_W_PATH} DESTINATION share/${PROJECT_NAME}/${ARG_DIRECTORY})
+ install(FILES ${FILES_W_PATH} DESTINATION share/${PROJECT_NAME}/${ARG_DST})
endif()
endmacro()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment