Skip to content

Accept a dqrobotics::dqrobotics target from a parent project - #12

Merged
mmmarinho merged 2 commits into
mainfrom
dqrobotics-parent-target
Oct 1, 2026
Merged

mmmarinho merged 2 commits into
mainfrom
dqrobotics-parent-target

Conversation

@mmmarinho

Copy link
Copy Markdown
Contributor

Lets a parent project build dqrobotics in-tree and hand it to sas_cpp, which the marinholab-sas-core Python package (MarinhoLab/sas_py) needs so it can link dqrobotics statically into its extension module. Today that package links a system-installed libdqrobotics and bundles it into the wheels.

Changes

  • dqrobotics discovery. The find_path/find_library lookup and the imported dqrobotics::dqrobotics target are now inside if(NOT TARGET dqrobotics::dqrobotics). A parent project can define that target first, for example as an ALIAS of a static dqrobotics target from add_subdirectory(dqrobotics/cpp). When no such target exists, the lookup runs exactly as before.
  • New option MARINHO_LAB_SAS_CORE_INSTALL, default ON. It wraps the install rules and the exported CMake package. A non-imported dqrobotics target is not in any export set, so install(EXPORT marinholab_sas_core-targets) stops with "requires target dqrobotics that is not in any export set". A parent that links the library into its own binary sets the option to OFF.

Standalone builds, the Docker pipeline and the Debian packaging do not define the target and keep the option at ON, so they behave exactly as before.

Testing

  • This repository's CI, unchanged, covers the standalone path (Docker build with the PPA's libdqrobotics, and the macOS build).
  • Through the parent path, MarinhoLab/sas_py builds this branch with an in-tree static dqrobotics: the macOS wheel locally, the ubuntu:noble Docker pipeline, and the full wheel CI matrix. See the companion sas_py PR.

🤖 Generated with Claude Code

mmmarinho and others added 2 commits September 30, 2026 21:00
A parent project that builds dqrobotics in-tree (e.g. the marinholab-sas-core
Python package, which links it statically into its extension module) can now
define dqrobotics::dqrobotics before add_subdirectory(sas_cpp); the
find_path/find_library lookup and the imported target are only used when no
such target exists. Standalone builds and the Debian packaging are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A parent project that provides dqrobotics::dqrobotics from a non-installed
target cannot export marinholab_sas_core (install(EXPORT) requires every
linked target to be in an export set), and does not need to install it. The
option defaults to ON, so standalone builds and the Debian packaging install
exactly as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@mmmarinho mmmarinho left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mmmarinho
mmmarinho merged commit 84b6dae into main Oct 1, 2026
9 checks passed
@mmmarinho
mmmarinho deleted the dqrobotics-parent-target branch October 1, 2026 09:51
mmmarinho added a commit to MarinhoLab/sas_py that referenced this pull request Oct 1, 2026
Add dqrobotics/cpp as submodules/dqrobotics_cpp, pinned to 674eae4, the
commit the required dqrobotics 26.4.0a7 Python release was built from (its
cpp submodule at dqrobotics/python e8f43c1 = v26.04.0 + 7 commits). _core
links it statically with hidden visibility, as working-needlemanipulation
does; DQ and DQ_SerialManipulator objects are still the dqrobotics
package's, through pybind11's shared type registry, so the two copies must
keep the same class layouts.

sas_cpp is bumped to the branch that uses a parent's dqrobotics::dqrobotics
target (MarinhoLab/sas_cpp#12). Its headers no longer bring Eigen's names
into scope, so sas_robot_driver_py.cpp uses Eigen::VectorXd explicitly.

The workflow no longer installs the DQ Robotics PPA or builds dqrobotics on
macOS and Windows, and no longer repairs the macOS and Windows wheels with
delocate and delvewheel (auditwheel still sets the manylinux tag). The
Docker pipeline drops the PPA and checks dqrobotics interop and that _core
links no libdqrobotics. The Eigen include shim is gone: no header of the
pinned dqrobotics includes <eigen3/Eigen/Dense>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant