Repository navigation
Use O3DE's 3rdParty convention for ROS 2 package dependencies to survive in Prebuilt Gems - #1066
Merged
jhanca-robotecai merged 3 commits intoAug 28, 2026
Conversation
Signed-off-by: Mateusz Żak <mateusz.zak@robotec.ai>
Model-declared dependencies survive the engine's install emission; consumers re-resolve them via FindROS2.cmake component resolution. Signed-off-by: Mateusz Żak <mateusz.zak@robotec.ai>
Signed-off-by: Mateusz Żak <mateusz.zak@robotec.ai>
zakmat
marked this pull request as draft
July 27, 2026 13:37
zakmat
marked this pull request as ready for review
August 2, 2026 10:50
jhanca-robotecai
approved these changes
Aug 25, 2026
jhanca-robotecai
left a comment
Collaborator
There was a problem hiding this comment.
The code looks correct.
I tested the build with the following set-ups:
- engine (source, 2605) + simulation Gems + binary proprietary Gem using ROS 2 as dependency
- engine (SDK, 2605) + simulation Gems + binary proprietary Gem using ROS 2 as dependency
In both setups I built the projects and exported them with mono+release and nonmono+profile configs.
michalpelka
approved these changes
Aug 27, 2026
This was referenced Sep 2, 2026
jhanca-robotecai
added a commit
that referenced
this pull request
Sep 8, 2026
* Introduce compression publication to ROS 2 camera (#1067) * Use O3DE's 3rdParty convention for ROS 2 package dependencies to survive in Prebuilt Gems (#1066) * Upgrade Tracy profiler to 1.14.1, also mark the tracy frame end to RHI OnFrameEnd. (#1090) * Add workflow to test simulation Gems for PR (#1089) --------- Signed-off-by: Michał Pełka <michal.pelka@robotec.ai> Signed-off-by: Mateusz Żak <mateusz.zak@robotec.ai> Signed-off-by: Ross Charles C. <10781734+rossbridger@users.noreply.github.com> Signed-off-by: Jan Hanca <jan.hanca@robotec.ai> Co-authored-by: Michał Pełka <michal.pelka@robotec.ai> Co-authored-by: Mateusz Żak <mateusz.zak@robotec.ai> Co-authored-by: Ross Charles C. <10781734+rossbridger@users.noreply.github.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.
What does this PR do?
This PR makes the ROS 2 package dependencies survive the gem export
ROS 2 dependency macros used to link resolved packaged directly with
target_link_libraries. That works well for source builds, where the macros run again at every configure but brings some issue when we want Gem to be packaged for distribution.In the latter case we would like to reuse O3DE existing mechanisms instead of handcrafting cmake files for all possible distribution variants. But using O3DE as is, it drops the deps that were not registered using its own functions.
To make it work I have replaced the
target_link_librarieswithly_equivalent and reused3rdParty::system to make the deps discoverable (each dependency is declared under3rdParty::ROS2::<pkg>and can be resolved independently by producer and consumers machines.3rdPartyis engine's magic that invokesFindROS2.cmakefor unresolved names on consumer's side). I have crafted the code so the existing macro signatures are unchanged, therefore no edits in existing Gems are needed.Additionally I moved the FindROS2.cmake to 3rdParty directory where it belongs by convention.
Also noticed that the above removed the need for custom registration - hence the third commit - but please advise against if you feel we should keep those lines. Some out-of-tree consumers might rely on it.
How was this PR tested?
Linux, ROS 2 Jazzy.
Source builds of the ROS 2 Gem and some of its dependent Gems - unaffected.
Prebuilt Gems flow tested on projects with 25.05 source engine with back-ported extras and SDK 26.05 engine.