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

Support installing package configuration files at different location #468

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

mmuetzel
Copy link
Contributor

This change allows the user to define a location for the CMake and pkg-config configuration files while installing the libraries, e.g., at a "default" location.

This will hopefully help for the use case described in #425.

@opoplawski: Would that work for your use-case?
You could, e.g., configure with

cmake -DSUITESPARSE_INCLUDEDIR=include/suitesparse64 -DSUITESPARSE_PKGFILEDIR=lib/suitesparse64 -DCMAKE_RELEASE_POSTFIX=64 [other flags for that configuration] ..

That would allow to install the headers to a separate location like you already proposed in #425. Additionally, it would allow to install the CMake package configuration files and the .pc files in a location that differs from the "usual" one.
However, the libraries themselves would still be installed at the default location (with the SUFFIX that you were using). So, no RPATH or LD_PRELOAD shenanigans would be needed.

When building projects that rely on the "non-default" variants, users would need to set one of the following (depending on their choice of build system):

cmake -DCMAKE_PREFIX_PATH=/usr/lib/suitesparse64/cmake
PKG_CONFIG_PATH=/usr/lib/suitesparse64/pkgconfig

What do you think?

@DrTimothyAldenDavis
Copy link
Owner

Looks great to me, but the pkgconfig setup is not something I know a lot about, so I'll defer to both @mmuetzel and @opoplawski on this question.

This change allows the user to define a location for the CMake and
pkg-config configuration files while installing the libraries, e.g., at
a "default" location.

This will hopefully help for the use case described in DrTimothyAldenDavis#425.
@DrTimothyAldenDavis
Copy link
Owner

Shall I go ahead and merge it in, or do we want more comments first?

@mmuetzel
Copy link
Contributor Author

If I understand the use-case described by @opoplawski in #425 correctly, this change would probably help to have those three variants of SuiteSparse installed at the same time. Also building depending projects should be straight forward after this change (if I'm not missing something important).
Running projects that depend on any of those variants should be working out-of-the-box afaict.
So, from my point of view, this could be merged.
If something is missing, this could still be refined later (or reverted if it doesn't help at all).

@DrTimothyAldenDavis
Copy link
Owner

OK -- merging it in, and if need be we can revise it later.

@DrTimothyAldenDavis DrTimothyAldenDavis merged commit 7782df0 into DrTimothyAldenDavis:dev2 Oct 25, 2023
17 checks passed
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