mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
Merge pull request #52859 from jtojnar/cmake-gid
cmake: use multiple outputs for GNUInstallDirs
This commit is contained in:
commit
883a1dffcf
1 changed files with 13 additions and 1 deletions
|
@ -68,8 +68,20 @@ cmakeConfigurePhase() {
|
|||
# executable. This flag makes the shared library accessible from its
|
||||
# nix/store directory.
|
||||
cmakeFlags="-DCMAKE_INSTALL_NAME_DIR=${!outputLib}/lib $cmakeFlags"
|
||||
|
||||
# This ensures correct paths with multiple output derivations
|
||||
# It requires the project to use variables from GNUInstallDirs module
|
||||
# https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
|
||||
cmakeFlags="-DCMAKE_INSTALL_BINDIR=${!outputBin}/bin $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_SBINDIR=${!outputBin}/sbin $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_INCLUDEDIR=${!outputInclude}/include $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_OLDINCLUDEDIR=${!outputInclude}/include $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_MANDIR=${!outputMan}/share/man $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_INFODIR=${!outputInfo}/share/info $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_DOCDIR=${!outputDoc}/share/doc/${shareDocName} $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_LIBDIR=${!outputLib}/lib $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_INCLUDEDIR=${!outputDev}/include $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_LIBEXECDIR=${!outputLib}/libexec $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_INSTALL_LOCALEDIR=${!outputLib}/share/locale $cmakeFlags"
|
||||
|
||||
# Don’t build tests when doCheck = false
|
||||
if [ -z "$doCheck" ]; then
|
||||
|
|
Loading…
Reference in a new issue