Skip to content

feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package#40

Merged
mitsudome-r merged 2 commits intoautowarefoundation:mainfrom
vish0012:fix/use-scoped-header-install-dir-argument-forwarding
Apr 1, 2026
Merged

feat(autoware_cmake): support USE_SCOPED_HEADER_INSTALL_DIR in autoware_ament_auto_package#40
mitsudome-r merged 2 commits intoautowarefoundation:mainfrom
vish0012:fix/use-scoped-header-install-dir-argument-forwarding

Conversation

@vish0012
Copy link
Copy Markdown
Contributor

@vish0012 vish0012 commented Mar 6, 2026

Description

This PR updates autoware_ament_auto_package() to support USE_SCOPED_HEADER_INSTALL_DIR.

This change is based on the scoped header installation investigation for avoiding resolution against apt-installed Autoware packages and prioritizing vcs-imported source packages.

Changes:

  • parse USE_SCOPED_HEADER_INSTALL_DIR in cmake_parse_arguments()
  • avoid forwarding this custom argument to ament_package()
  • install and export headers under include/${PROJECT_NAME} when the option is enabled
  • keep the default flat include behavior when the option is not enabled

This fixes the configure-time error on Humble where ament_package() receives an unsupported argument, and also makes the scoped header install option actually functional.

How was this PR tested?

Tested with clean build investigation using autoware_point_types.

Before the fix, enabling USE_SCOPED_HEADER_INSTALL_DIR caused:

ament_package() called with unused arguments: USE_SCOPED_HEADER_INSTALL_DIR

After this change:

  • build succeeds while keeping USE_SCOPED_HEADER_INSTALL_DIR enabled
  • headers are installed under the scoped path as expected

Notes for reviewers

This is the base change needed before replacing ament_auto_package() with autoware_ament_auto_package() in affected packages.

Effects on system behavior

None, unless USE_SCOPED_HEADER_INSTALL_DIR is explicitly enabled.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2026

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

Comment thread autoware_cmake/cmake/autoware_ament_auto_package.cmake Outdated
Comment thread autoware_cmake/cmake/autoware_ament_auto_package.cmake Outdated
Removed unnecessary FILES_MATCHING patterns from install commands.
@mitsudome-r mitsudome-r merged commit db00020 into autowarefoundation:main Apr 1, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants