build both the ROS2 package and a plain CMake configuration - #10
Merged
zeerekahmad merged 1 commit intoAug 18, 2026
Merged
Conversation
find_package(ament_cmake QUIET) selects the branch, so one CMakeLists serves colcon and the wheel build. Under ament the library stays SHARED and is exported to downstream packages; without it the library is STATIC and position-independent, so the pybind11 module is self-contained and a wheel ships a single .so. Install, export and ament_package() calls move under the ament guard, and the wheel path installs the extension at the root. Drops the pybind11_vendor lookup for a direct pybind11 CONFIG lookup (vendor is a ROS2 package and is unavailable off-distro), the LINK_OPTIONS "" workaround, and the -Wl,-no-undefined link option that the static/pybind combination cannot satisfy. cmake_minimum_required rises to 3.15 to match what scikit-build-core requires. package.xml promotes pybind11_vendor to a full depend, adds python3-numpy and ament_cmake_test, and refreshes the description and maintainer. CI gains a standalone_cmake job so the non-ament path is actually exercised; CMAKE_DISABLE_FIND_PACKAGE_ament_cmake forces that branch even on a ROS2 runner. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: build both the ROS2 package and a plain CMake configuration
zeerekahmad/kinematics-dual-buildzeerekahmad/kinematics-projectorscac4573Description
One
CMakeLists.txtnow serves both colcon and the wheel build.find_package(ament_cmake QUIET)selects thebranch: under ament the library stays SHARED and is exported to downstream packages; without it the library is
STATIC and position-independent, so the pybind11 module is self-contained and a wheel ships a single
.so.ament_package()calls move under the ament guard; the wheel path installs theextension at the root.
pybind11_vendorlookup for a directpybind11 CONFIGlookup (vendor is a ROS2 package and isunavailable off-distro), the
LINK_OPTIONS ""workaround, and the-Wl,-no-undefinedlink option that thestatic/pybind combination cannot satisfy.
cmake_minimum_requiredrises to 3.15 to match what scikit-build-core requires.package.xmlpromotespybind11_vendorto a full depend, addspython3-numpyandament_cmake_test, andrefreshes the description and maintainer.
standalone_cmakejob so the non-ament path is actually exercised;CMAKE_DISABLE_FIND_PACKAGE_ament_cmakeforces that branch even on a ROS2 runner.Migration Guide
No API change for consumers. Downstream ROS 2 packages keep linking the same exported SHARED target; only the
non-ament configuration is new.
Related issues
Completeness checklist
Stack created with GitHub Stacks CLI • Give Feedback 💬