-
Notifications
You must be signed in to change notification settings - Fork 47
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 #97
Comments
This was referenced May 9, 2022
I tried using cmake_path but cmake being cmake it doesn't work for obscure reasons if(${CMAKE_VERSION} VERSION_LESS "3.20.0")
set(libdir "\$\{prefix\}/${CMAKE_INSTALL_LIBDIR}")
set(includedir "\$\{prefix\}/${CMAKE_INSTALL_INCLUDEDIR}")
else()
cmake_path(RELATIVE_PATH "${CMAKE_INSTALL_LIBDIR}" BASE_DIRECTORY "${CMAKE_INSTALL_PREFIX}" libdir)
cmake_path(RELATIVE_PATH ${CMAKE_INSTALL_INCLUDEDIR} BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX} includedir)
endif()
|
robUx4
added a commit
that referenced
this issue
May 15, 2022
Apparently it wants variables not paths. Luckily it's already in a variable... |
robUx4
added a commit
that referenced
this issue
May 15, 2022
robUx4
added a commit
that referenced
this issue
May 15, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As per title:
CMakeLists.txt
hasand so can’t handle absolute paths in
CMAKE_INSTALL_{INCLUDE,LIB}DIR
. This leads to a broken .pc file on NixOS in particular.Identical to Matroska-Org/libmatroska#62. Similar to open-source-parsers/jsoncpp#1199. See “Concatenating paths when building pkg-config files” for a discussion of the problem in a somewhat different context and a suggested fix (I don’t know CMake myself, sorry).
The text was updated successfully, but these errors were encountered: