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

pkg-config file is broken when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute #733

Closed
alexshpilkin opened this issue May 18, 2022 · 1 comment · Fixed by #776
Closed

pkg-config file is broken when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute #733

alexshpilkin opened this issue May 18, 2022 · 1 comment · Fixed by #776

Comments

@alexshpilkin
Copy link

As per title: CMakeLists.txt has

set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "\${prefix}")
set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")

and so can’t handle absolute paths in CMAKE_INSTALL_{INCLUDE,LIB}DIR. This leads to broken .pc files on NixOS in particular.

See “Concatenating paths when building pkg-config files” for a thorough discussion of the problem and a suggested fix, or KDE’s extra-cmake-modules for a simpler approach.

alanxz added a commit that referenced this issue May 3, 2023
Fixes: #733

Signed-off-by: GitHub <noreply@github.com>
alanxz added a commit that referenced this issue May 3, 2023
Fixes: #733

Signed-off-by: GitHub <noreply@github.com>
@alanxz
Copy link
Owner

alanxz commented May 3, 2023

Bug has been fixed, thanks for reporting it.

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 a pull request may close this issue.

2 participants