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

CMakeLists.txt: Respect user's libdir #69

Merged
merged 1 commit into from
Mar 3, 2021
Merged

CMakeLists.txt: Respect user's libdir #69

merged 1 commit into from
Mar 3, 2021

Conversation

thesamesam
Copy link
Contributor

@thesamesam thesamesam commented Feb 27, 2021

Without this patch, on systems where /usr/lib64/ is used
(e.g. Gentoo), libraries are installed
to /usr/lib/ despite the standard CMake arguments
being passed.

It's not exactly clear what the canonical way
is to take libdir parameters in CMake, but
GNUInstallDirs mostly handles it for the *NIX case.

To be minimally invasive here, I've only changed
the *NIX path and aligned as much of the logic as possible.

Signed-off-by: Sam James sam@gentoo.org

Summary of changes
Honour CMAKE_INSTALL_LIBDIR to ensure we install libraries to the correct path on different Linux distributions which choose a different lib/lib64 layout.

Affected backends
Build system (CMake)

Without this patch, on systems where /usr/lib64/ is used
(e.g. Gentoo), libraries are installed
to /usr/lib/ despite the standard CMake arguments
being passed.

It's not exactly clear what *the* canonical way
is to take libdir parameters in CMake, but
GNUInstallDirs mostly handles it for the *NIX case.

To be minimally invasive here, I've only changed
the *NIX path and aligned as much of the logic as possible.

Signed-off-by: Sam James <sam@gentoo.org>
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Feb 27, 2021
URL: wgois/OIS#69
Signed-off-by: Sam James <sam@gentoo.org>
@Ybalrid
Copy link
Member

Ybalrid commented Mar 3, 2021

Thanks, seems good. Gonna merge that now.

@Ybalrid Ybalrid merged commit 23ecb0c into wgois:master Mar 3, 2021
@thesamesam
Copy link
Contributor Author

Thanks a bunch @Ybalrid!

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