From 491f7f017c4dd247413d3367d4733541c797d9ea Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Tue, 19 Apr 2016 20:36:03 -0500 Subject: [PATCH] cmake: set LIBDIR and INCLUDEDIR for multiple outputs --- pkgs/development/libraries/polkit-qt-1/qt-5.nix | 5 ----- pkgs/development/tools/build-managers/cmake/setup-hook.sh | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/polkit-qt-1/qt-5.nix b/pkgs/development/libraries/polkit-qt-1/qt-5.nix index c6e26385d446..bdeb175b89f5 100644 --- a/pkgs/development/libraries/polkit-qt-1/qt-5.nix +++ b/pkgs/development/libraries/polkit-qt-1/qt-5.nix @@ -16,11 +16,6 @@ stdenv.mkDerivation { propagatedBuildInputs = [ polkit glib qtbase ]; - preConfigure = '' - cmakeFlags+=" -DCMAKE_INSTALL_LIBDIR=''${!outputLib}/lib" - cmakeFlags+=" -DCMAKE_INSTALL_INCLUDEDIR=''${!outputDev}/include" - ''; - postFixup = '' # Fix library location in CMake module sed -i "$dev/lib/cmake/PolkitQt5-1/PolkitQt5-1Config.cmake" \ diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh index b14e9984bc3c..eaabb37f4987 100755 --- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh +++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh @@ -44,6 +44,8 @@ cmakeConfigurePhase() { # executable. This flag makes the shared library accessible from its # nix/store directory. cmakeFlags="-DCMAKE_INSTALL_NAME_DIR=$prefix/lib $cmakeFlags" + cmakeFlags="-DCMAKE_INSTALL_LIBDIR=${!outputLib}/lib $cmakeFlags" + cmakeFlags="-DCMAKE_INSTALL_INCLUDEDIR=${!outputDev}/include $cmakeFlags" # Avoid cmake resetting the rpath of binaries, on make install # And build always Release, to ensure optimisation flags