Skip to content

Commit

Permalink
Update ros-noetic-moveit-ros-planning-interface.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias-Fischer authored Feb 9, 2024
1 parent b9f5e56 commit 0fd825a
Showing 1 changed file with 34 additions and 7 deletions.
41 changes: 34 additions & 7 deletions patch/ros-noetic-moveit-ros-planning-interface.patch
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,44 @@ index 17de157197..fdae58ab37 100644
{
public:
/** \brief Default ROS parameter name from where to read the robot's URDF. Set to 'robot_description' */
diff --git a/py_bindings_tools/CMakeLists.txt b/py_bindings_tools/CMakeLists.txt
index 1f82d7e4dc..9ef98d8136 100644
--- a/py_bindings_tools/CMakeLists.txt
+++ b/py_bindings_tools/CMakeLists.txt
@@ -1,5 +1,9 @@
diff --git a/moveit_ros/planning_interface/py_bindings_tools/CMakeLists.txt b/moveit_ros/planning_interface/py_bindings_tools/CMakeLists.txt
index 1f82d7e4dc..2f9112fb85 100644
--- a/moveit_ros/planning_interface/py_bindings_tools/CMakeLists.txt
+++ b/moveit_ros/planning_interface/py_bindings_tools/CMakeLists.txt
@@ -1,8 +1,14 @@
set(MOVEIT_LIB_NAME moveit_py_bindings_tools)

+find_package(PythonInterp REQUIRED)
+find_package(PythonLibs "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" REQUIRED)
+
+
add_library(${MOVEIT_LIB_NAME} src/roscpp_initializer.cpp)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")
target_link_libraries(${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
-target_link_libraries(${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
+target_link_libraries(${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
+if(NOT APPLE)
+ target_link_libraries(${MOVEIT_LIB_NAME} ${PYTHON_LIBRARIES})
+endif(NOT APPLE)

install(TARGETS ${MOVEIT_LIB_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
@@ -10,13 +16,19 @@ install(TARGETS ${MOVEIT_LIB_NAME}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION})

add_library(${MOVEIT_LIB_NAME}_python src/wrap_python_roscpp_initializer.cpp)
-target_link_libraries(${MOVEIT_LIB_NAME}_python ${MOVEIT_LIB_NAME} ${PYTHON_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
+target_link_libraries(${MOVEIT_LIB_NAME}_python ${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
+if(NOT APPLE)
+ target_link_libraries(${MOVEIT_LIB_NAME}_python ${PYTHON_LIBRARIES})
+endif(NOT APPLE)
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES OUTPUT_NAME _moveit_roscpp_initializer PREFIX "")
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}")
if(WIN32)
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES SUFFIX .pyd)
endif(WIN32)
+if(APPLE)
+ set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES SUFFIX .so)
+endif(APPLE)

install(TARGETS ${MOVEIT_LIB_NAME}_python
DESTINATION ${CATKIN_PACKAGE_PYTHON_DESTINATION})

0 comments on commit 0fd825a

Please sign in to comment.