diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2019-07-25 16:05:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-25 16:05:10 -0400 |
commit | 883a1dffcfe4734a3b13a034869e94edafc90322 (patch) | |
tree | b883ad69d2aafb4a7fd1bdd17d3b915009cba399 | |
parent | 6d6e2181d66c48a4cbb6ed49d74459308df3854c (diff) | |
parent | c0d2f924590918b0176aaf1f84ccf372ce4f13c4 (diff) | |
download | nixpkgs-883a1dffcfe4734a3b13a034869e94edafc90322.tar nixpkgs-883a1dffcfe4734a3b13a034869e94edafc90322.tar.gz nixpkgs-883a1dffcfe4734a3b13a034869e94edafc90322.tar.bz2 nixpkgs-883a1dffcfe4734a3b13a034869e94edafc90322.tar.lz nixpkgs-883a1dffcfe4734a3b13a034869e94edafc90322.tar.xz nixpkgs-883a1dffcfe4734a3b13a034869e94edafc90322.tar.zst nixpkgs-883a1dffcfe4734a3b13a034869e94edafc90322.zip |
Merge pull request #52859 from jtojnar/cmake-gid
cmake: use multiple outputs for GNUInstallDirs
-rwxr-xr-x | pkgs/development/tools/build-managers/cmake/setup-hook.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh index 8c6b11bd73e..29fe6fd79de 100755 --- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh +++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh @@ -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 |