Skip to content
Snippets Groups Projects
Commit 26d93b34 authored by Stefan Herbrechtsmeier's avatar Stefan Herbrechtsmeier Committed by Lukas Bulwahn
Browse files

gencpp: Backport relocation changes

parent 1e7fafdc
No related branches found
No related tags found
No related merge requests found
From 4e51c828b27eb1d67a3199c692aac1783f853493 Mon Sep 17 00:00:00 2001
From: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
Date: Fri, 12 Jul 2013 09:59:13 +0200
Subject: [PATCH] gencpp-extras.cmake.em: Use find_program for GENCPP_BIN
This patch was originally created by
Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>.
I only adjusted it to the current version.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
---
cmake/gencpp-extras.cmake.em | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/cmake/gencpp-extras.cmake.em b/cmake/gencpp-extras.cmake.em
index 87f46fd..4fc5284 100644
--- a/cmake/gencpp-extras.cmake.em
+++ b/cmake/gencpp-extras.cmake.em
@@ -1,13 +1,17 @@
@[if DEVELSPACE]@
# bin and template dir variables in develspace
-set(GENCPP_BIN "@(CMAKE_CURRENT_SOURCE_DIR)/scripts/gen_cpp.py")
+set(GENCPP_BIN_DIR "@(CMAKE_CURRENT_SOURCE_DIR)/scripts")
set(GENCPP_TEMPLATE_DIR "@(CMAKE_CURRENT_SOURCE_DIR)/scripts")
+set(CATKIN_FIND_ROOT_PATH_MODE NO_CMAKE_FIND_ROOT_PATH)
@[else]@
# bin and template dir variables in installspace
-set(GENCPP_BIN "@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_BIN_DESTINATION)/gen_cpp.py")
-set(GENCPP_TEMPLATE_DIR "@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_SHARE_DESTINATION)")
+set(GENCPP_BIN_DIR "@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_BIN_DESTINATION)")
+set(GENCPP_TEMPLATE_DIR "${CMAKE_CURRENT_LIST_DIR}/..")
+set(CATKIN_FIND_ROOT_PATH_MODE "")
@[end if]@
+find_program(GENCPP_BIN gen_cpp.py PATHS ${GENCPP_BIN_DIR} NO_DEFAULT_PATH ${CATKIN_FIND_ROOT_PATH_MODE})
+
# Generate .msg->.h for cpp
# The generated .h files should be added ALL_GEN_OUTPUT_FILES_cpp
macro(_generate_msg_cpp ARG_PKG ARG_MSG ARG_IFLAGS ARG_MSG_DEPS ARG_GEN_OUTPUT_DIR)
--
1.7.9.5
From e5acaf690d6276d427f6b0ecaab67b52f55bbe8a Mon Sep 17 00:00:00 2001
From: Dirk Thomas <dthomas@osrfoundation.org>
Date: Fri, 26 Jul 2013 13:33:58 -0700
Subject: [PATCH] resolve gencpp path in installspace at runtime
(ros/catkin#490)
---
cmake/gencpp-extras.cmake.em | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmake/gencpp-extras.cmake.em b/cmake/gencpp-extras.cmake.em
index 87f46fd..88ce935 100644
--- a/cmake/gencpp-extras.cmake.em
+++ b/cmake/gencpp-extras.cmake.em
@@ -4,8 +4,8 @@ set(GENCPP_BIN "@(CMAKE_CURRENT_SOURCE_DIR)/scripts/gen_cpp.py")
set(GENCPP_TEMPLATE_DIR "@(CMAKE_CURRENT_SOURCE_DIR)/scripts")
@[else]@
# bin and template dir variables in installspace
-set(GENCPP_BIN "@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_BIN_DESTINATION)/gen_cpp.py")
-set(GENCPP_TEMPLATE_DIR "@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_SHARE_DESTINATION)")
+set(GENCPP_BIN "${gencpp_DIR}/../../../@(CATKIN_PACKAGE_BIN_DESTINATION)/gen_cpp.py")
+set(GENCPP_TEMPLATE_DIR "${gencpp_DIR}/..")
@[end if]@
# Generate .msg->.h for cpp
--
1.8.1.6
......@@ -5,12 +5,12 @@ LIC_FILES_CHKSUM = "file://package.xml;beginline=7;endline=7;md5=d566ef916e9dedc
DEPENDS = "genmsg-native"
PR = "r1"
PR = "r2"
SRC_URI = "https://github.com/ros/${ROS_SPN}/archive/${PV}.tar.gz;downloadfilename=${ROS_SP}.tar.gz"
SRC_URI[md5sum] = "801b40dcfab468f761dbdae33f848782"
SRC_URI[sha256sum] = "d1dcd6655c8c4d4325ab067c25284032d40e00aa3409a5a5cf069d310a60d485"
SRC_URI += "file://0001-gencpp-extras.cmake.em-Use-find_program-for-GENCPP_B.patch"
SRC_URI += "file://0001-resolve-gencpp-path-in-installspace-at-runtime.patch"
inherit catkin
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