Skip to content

[backport] Fix headers destination installed by ament_auto_package (#540)#574

Closed
HansRobo wants to merge 1 commit intoament:humblefrom
HansRobo:humble_backport_540
Closed

[backport] Fix headers destination installed by ament_auto_package (#540)#574
HansRobo wants to merge 1 commit intoament:humblefrom
HansRobo:humble_backport_540

Conversation

@HansRobo
Copy link
Copy Markdown
Contributor

@HansRobo HansRobo commented Apr 7, 2025

This pull-request backports a bug fix for ament_auto_package to humble branch.
#540 changes the header install target, but it shouldn't be destructive since it updating dependencies properly.

* fix headers destination installed by ament_auto_package 

Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>

* Fix exporting include directory target by ament_auto_package

Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>

---------

Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
@sloretz
Copy link
Copy Markdown
Contributor

sloretz commented Apr 7, 2025

Thank you for the backports!

I'm hesitant to accept this backport. While it's uncommon, I've come across people hard-coding include paths to use their non-CMake build system. This change would break those kinds of builds.

@HansRobo
Copy link
Copy Markdown
Contributor Author

HansRobo commented Apr 7, 2025

That perspective was certainly overlooked for me, thank you!
The decision on whether to change the install target and cut off users that is like you mentioned should be made by package developers using ament_cmake, not by us ament_cmake developers.

On the other hand, at present, the only way to apply this change to anything other than rolling is to use a patched fork to build ament_cmake from source.

However, since I want more people to use this patch and put an end to the include path pollution, I came up with an alternative solution.

I propose to add an argument to the ament_auto_package function to switch the install target (defaulting to legacy behavior to ensure backwards compatibility).
With this proposal, the install target switch would not be applied automatically, and users would have the choice. What do you think?

@sloretz
Copy link
Copy Markdown
Contributor

sloretz commented Apr 7, 2025

I propose to add an argument to the ament_auto_package function to switch the install target (defaulting to legacy behavior to ensure backwards compatibility).
With this proposal, the install target switch would not be applied automatically, and users would have the choice. What do you think?

I think that's a great idea!

@HansRobo
Copy link
Copy Markdown
Contributor Author

HansRobo commented Apr 7, 2025

Thank you for your advice.
I'll implement the proposal and close this directly backporting pull-request.

@HansRobo
Copy link
Copy Markdown
Contributor Author

HansRobo commented Apr 9, 2025

@sloretz I implemented the idea on #577. Could you review it?

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