Skip to content

Conversation

fferri
Copy link

@fferri fferri commented Jul 1, 2025

This PR introduces a CMake option TINYXML2_USE_SYSTEM_PACKAGE MUJOCO_USE_SYSTEM_TINYXML2 (default OFF) to allow users to link against a system-provided installation (via find_package(tinyxml2 REQUIRED)) of tinyxml2 instead of always fetching and building MuJoCo’s bundled copy.

Motivation:

If the client program also uses tinyxml2 e.g. links to the system's version of tinyxml2, symbol clashes can occur, especially if the versions are slightly different, which leads to crashes.

@fferri fferri changed the title add TINYXML2_USE_SYSTEM_PACKAGE CMake option add MUJOCO_USE_SYSTEM_TINYXML2 CMake option Jul 2, 2025
Copy link
Contributor

@traversaro traversaro left a comment

Choose a reason for hiding this comment

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

Thanks a lot! Eventually I think it make sense to use tinyxml2::tinyxml2 everywhere, but that can be a different PR.

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.

2 participants