From f8a76d5448c74b52cb73e5d3bbaef0333541bb00 Mon Sep 17 00:00:00 2001 From: James Goppert Date: Mon, 22 Aug 2016 01:19:08 -0400 Subject: [PATCH 1/3] Added cmake and ROS/catkin support. --- CMakeLists.txt | 28 ++++++++++++++++++++++++++++ package.xml | 17 +++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 package.xml diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..4f421f0 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 2.8.3) + +project(transforms3d NONE) + +enable_testing() + +find_package(PythonInterp REQUIRED) +find_program(NOSE nosetests) +if (NOT NOSE) + message(FATAL_ERROR "could not find nosetests program") +endif() + +set(setup_py ${CMAKE_CURRENT_SOURCE_DIR}/setup.py) + +add_custom_target(python_build ALL ${PYTHON_EXECUTABLE} + ${setup_py} build + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + ) + +add_test(nose ${NOSE} ${CMAKE_CURRENT_SOURCE_DIR}/transforms3d) + +install(CODE "execute_process( + COMMAND ${PYTHON_EXECUTABLE} ${setup_py} install + --prefix=${CMAKE_INSTALL_PREFIX} --root=${DESTDIR} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + )") + +install(FILES package.xml DESTINATION share/transforms3d) diff --git a/package.xml b/package.xml new file mode 100644 index 0000000..ca7f543 --- /dev/null +++ b/package.xml @@ -0,0 +1,17 @@ + + + transforms3d + 0.3.0 + The transforms3d package + jgoppert + BSD + https://github.com/matthew-brett/transforms3d + python-nose + catkin + catkin + + cmake + + + + From 5238f692799a75fffe76f80c07590d72b60278d3 Mon Sep 17 00:00:00 2001 From: James Goppert Date: Mon, 22 Aug 2016 01:33:09 -0400 Subject: [PATCH 2/3] Fix install issue. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f421f0..dc3a83a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ add_test(nose ${NOSE} ${CMAKE_CURRENT_SOURCE_DIR}/transforms3d) install(CODE "execute_process( COMMAND ${PYTHON_EXECUTABLE} ${setup_py} install - --prefix=${CMAKE_INSTALL_PREFIX} --root=${DESTDIR} + --prefix=${CMAKE_INSTALL_PREFIX} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )") From 9d0aa2e0e63abeb61ba3397e5c60870d6fdd8877 Mon Sep 17 00:00:00 2001 From: James Goppert Date: Mon, 22 Aug 2016 12:30:52 -0400 Subject: [PATCH 3/3] Install fix for catkin. --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dc3a83a..3c086fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,7 @@ enable_testing() find_package(PythonInterp REQUIRED) find_program(NOSE nosetests) + if (NOT NOSE) message(FATAL_ERROR "could not find nosetests program") endif() @@ -17,12 +18,13 @@ add_custom_target(python_build ALL ${PYTHON_EXECUTABLE} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) -add_test(nose ${NOSE} ${CMAKE_CURRENT_SOURCE_DIR}/transforms3d) - install(CODE "execute_process( COMMAND ${PYTHON_EXECUTABLE} ${setup_py} install --prefix=${CMAKE_INSTALL_PREFIX} + --install-layout=deb WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )") install(FILES package.xml DESTINATION share/transforms3d) + +add_test(nose ${NOSE} ${CMAKE_CURRENT_SOURCE_DIR}/transforms3d)