You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set (prefix ${CMAKE_INSTALL_PREFIX})
set (exec_prefix "\${prefix}")
set (libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
set (includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
set (bindir "${CMAKE_INSTALL_FULL_BINDIR}")
set (sysconfdir "${CMAKE_INSTALL_FULL_SYSCONFDIR}")
set (top_srcdir "${CMAKE_CURRENT_SOURCE_DIR}")
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. (Using FULL variables as already done for other directories is a possibility, but seems to be frowned upon by some other distributions. That applies just as much to BINDIR and SYSCONFDIR, though.)
The text was updated successfully, but these errors were encountered:
@aberaud I’m not a CMake expert by any stretch of the imagination, but the KDE one, with if (IS_ABSOLUTE ...), seems to be compatible even with very old CMake versions, down to 3.0 even. It’s a bit less perfectionist than full path-joining in that it will leave a dot-dot component as is if someone passes one (why?..), but should still work correctly in all cases. (Even simpler would be to use the CMAKE_INSTALL_FULL_*DIR variables, which have also existed since basically forever, but this sacrifices relocatability, which some people apparently want.)
As per title:
CMakeLists.txt
hasand 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. (Using FULL variables as already done for other directories is a possibility, but seems to be frowned upon by some other distributions. That applies just as much to BINDIR and SYSCONFDIR, though.)
The text was updated successfully, but these errors were encountered: