Skip to content

Conversation

@roehling
Copy link
Contributor

@roehling roehling commented May 12, 2022

This moves the logic to compute the install prefix to a single location
in the main config file. Extra config files can use the new
<package>_IMPORT_PREFIX variable, which simplifies the code and makes it
more robust to future changes.

The logic to compute <package>_IMPORT_PREFIX has been taken from the
CMakePackageConfigHelpers module. The code is well-tested and also
handles symlink aliasing.

EDIT I renamed AMENT_IMPORT_PREFIX to <package>_IMPORT_PREFIX because initially, I did not take recursive find_package() calls into account, which may clobber a single global variable.

roehling added 2 commits May 12, 2022 12:42
This moves the logic to compute the install prefix to a single location
in the main config file. Extra config files can use the new
AMENT_IMPORT_PREFIX variable, which simplifies the code and makes it
more robust to future changes.

The logic to compute AMENT_IMPORT_PREFIX has been taken from the
CMakePackageConfigHelpers module. The code is well-tested and also
handles symlink aliasing.

Signed-off-by: Timo Röhling <[email protected]>
@roehling roehling force-pushed the ament_import_prefix branch from 8aad271 to d148e76 Compare May 12, 2022 21:50
@roehling roehling changed the title Introduce relocatable AMENT_IMPORT_PREFIX Introduce relocatable <package>_IMPORT_PREFIX variable May 12, 2022
@clalancette clalancette requested a review from hidmic May 31, 2022 14:19
@audrow audrow changed the base branch from master to rolling June 28, 2022 14:14
@roehling
Copy link
Contributor Author

Any progress on the review for this PR? I still think the import prefix would be quite useful and much more readable than ${package_DIR}/../../../

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