Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce relocatable <package>_IMPORT_PREFIX variable #389

Open
wants to merge 2 commits into
base: rolling
Choose a base branch
from

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.

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 <roehling@debian.org>
Signed-off-by: Timo Röhling <roehling@debian.org>
@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
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.

None yet

2 participants