Skip to content

frontend,libobs: use CMake variable for libdir - #14295

Open
Chiitoo wants to merge 1 commit into
obsproject:masterfrom
Chiitoo:pc-libdir
Open

Chiitoo wants to merge 1 commit into
obsproject:masterfrom
Chiitoo:pc-libdir

Conversation

@Chiitoo

@Chiitoo Chiitoo commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

Use libdir=@CMAKE_INSTALL_FULL_LIBDIR@ instead of libdir=${prefix}/lib.

Motivation and Context

With this the pkgconfig bits make more use of CMake variables to make things more flexible, and avoid issues on different platforms and environments, while also making the CMake related set-up more consistent.

Downstream bug:

https://bugs.gentoo.org/980148

For more downstream context, see for example:

https://bugs.gentoo.org/729642

Perhaps it would make sense to use the variables for the other values in these as well, similar to how it is already being done in libobs/pkgconfig/libobs.pc.in.

That would also allow for -Werror to be conveniently set somewhere else, for the CI and where otherwise desired.

I believe it rarely makes sense downstream, causing build errors with new GCC warnings for example, while they're not doing any actual harm.

For some more context on that, see for example:

https://devmanual.gentoo.org/ebuild-writing/common-mistakes/#-werror-compiler-flag-not-removed

Thank you!

How Has This Been Tested?

Built and ran on Gentoo Linux (amd64 and arm64).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

With this the pkgconfig bits make more use of CMake variables
to make things more flexible, and avoid issues on different
platforms and environments, while also making the CMake
related set-up more consistent.

Downstream bug:

- https://bugs.gentoo.org/980148

For more downstream context, see for example:

- https://bugs.gentoo.org/729642

Signed-off-by: Jimi Huotari <chiitoo@gentoo.org>
@tytan652

tytan652 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Looks good but I would argue to keep using the prefix variable for consistency, e.g. ${prefix}/@CMAKE_INSTALL_LIBDIR@

This branch has not been deployed

No deployments
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