Remove pybind11 submodule

This commit is contained in:
Robert Haschke 2025-08-10 10:57:20 +02:00
parent d19b77782d
commit 717771e25a
5 changed files with 1 additions and 39 deletions

5
.gitmodules vendored
View File

@ -1,8 +1,3 @@
[submodule "core/python/pybind11"]
path = core/python/pybind11
url = https://github.com/pybind/pybind11
branch = smart_holder
shallow = true
[submodule "core/src/scope_guard"] [submodule "core/src/scope_guard"]
path = core/src/scope_guard path = core/src/scope_guard
url = https://github.com/ricab/scope_guard url = https://github.com/ricab/scope_guard

View File

@ -36,7 +36,6 @@ catkin_package(
moveit_task_constructor_msgs moveit_task_constructor_msgs
rviz_marker_tools rviz_marker_tools
visualization_msgs visualization_msgs
CFG_EXTRAS pybind11.cmake
) )
set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE) set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE)

View File

@ -1,9 +0,0 @@
# pybind11 must use the ROS python version
set(PYBIND11_PYTHON_VERSION ${PYTHON_VERSION})
if(@INSTALLSPACE@)
include(${CMAKE_CURRENT_LIST_DIR}/pybind11Config.cmake)
else()
# in build space, directly include pybind11 directory
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../pybind11 ${CMAKE_CURRENT_BINARY_DIR}/pybind11)
endif()

View File

@ -1,28 +1,6 @@
# We rely on pybind11's smart_holder branch imported pybind11 via git submodule
# pybind11 must use the ROS python version # pybind11 must use the ROS python version
set(PYBIND11_PYTHON_VERSION ${PYTHON_VERSION}) set(PYBIND11_PYTHON_VERSION ${PYTHON_VERSION})
find_package(pybind11 3.0 REQUIRED)
# create symlink to grant access to downstream packages in devel space
add_custom_target(pybind11_devel_symlink ALL COMMAND ${CMAKE_COMMAND} -E create_symlink
${CMAKE_CURRENT_SOURCE_DIR}/pybind11
${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/pybind11)
# 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 ${CATKIN_PACKAGE_SHARE_DESTINATION}/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()
#catkin_lint: ignore_once subproject duplicate_cmd
add_subdirectory(pybind11)
# C++ wrapper code # C++ wrapper code
add_subdirectory(bindings) add_subdirectory(bindings)

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