Package: ros-geometry2 / 0.6.5-3

0004-Build-Python-3-version-of-tf2_py.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Fri, 17 Aug 2018 15:22:54 +0200
Subject: Build Python 3 version of tf2_py

---
 CMakeLists.txt | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a03ca7a..f46f6dd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,3 +10,13 @@ add_subdirectory( tf2_geometry_msgs )
 add_subdirectory( tf2_kdl )
 add_subdirectory( tf2_sensor_msgs )
 add_subdirectory( tf2_tools )
+
+include(ExternalProject)
+ExternalProject_Add(tf2_py_python3
+    SOURCE_DIR ${CMAKE_SOURCE_DIR}/tf2_py
+    INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/tf2_py_python3
+    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DPYTHON_VERSION=3 -DCMAKE_PREFIX_PATH=${CMAKE_BINARY_DIR}/devel/
+    INSTALL_COMMAND make DESTDIR=${CMAKE_CURRENT_BINARY_DIR}/tf2_py_python3 install
+)
+add_dependencies(tf2_py_python3 tf2)
+install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tf2_py_python3/${CMAKE_INSTALL_PREFIX}/ DESTINATION ".")