migrate to pybind11_vendor

migrate to pybind11_vendor https://github.com/ros2/pybind11_vendor
This commit is contained in:
Mos 2025-07-16 12:18:53 +02:00
parent 7e1303dee1
commit e6753135f0
3 changed files with 4 additions and 22 deletions

View File

@ -12,6 +12,8 @@ find_package(moveit_core REQUIRED)
find_package(moveit_ros_planning REQUIRED)
find_package(moveit_ros_planning_interface REQUIRED)
find_package(moveit_task_constructor_msgs REQUIRED)
find_package(pybind11_vendor REQUIRED)
find_package(pybind11 REQUIRED)
find_package(py_binding_tools REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rviz_marker_tools REQUIRED)

View File

@ -2,27 +2,8 @@
find_package(ament_cmake_python REQUIRED)
find_package(Python3 COMPONENTS Interpreter Development)
# pybind11 must use the ROS python version
set(PYBIND11_PYTHON_VERSION ${PYTHON_VERSION})
# Use minimum-size optimization for pybind11 bindings
add_compile_options("-Os")
# configure pybind11 install for use by downstream packages in install space
set(PYBIND11_INSTALL ON CACHE INTERNAL "Install pybind11")
set(CMAKE_INSTALL_INCLUDEDIR include/moveit/python)
set(PYBIND11_CMAKECONFIG_INSTALL_DIR share/${PROJECT_NAME}/cmake
CACHE INTERNAL "install path for pybind11 cmake files")
# source pybind11 folder, which exposes its targets and installs them
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/pybind11/CMakeLists.txt")
message("Missing content of submodule pybind11: Use 'git clone --recurse-submodule' in future.\n"
"Checking out content automatically")
execute_process(COMMAND git submodule init WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
execute_process(COMMAND git submodule update WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endif()
add_subdirectory(pybind11)
find_package(pybind11_vendor REQUIRED)
find_package(pybind11 REQUIRED)
# C++ wrapper code
add_subdirectory(bindings)

@ -1 +0,0 @@
Subproject commit f4bc71f981d4eb2dd780215fd3c5a7420f1f03aa