about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/nlopt/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/nlopt/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/nlopt/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/nlopt/default.nix b/nixpkgs/pkgs/development/libraries/nlopt/default.nix
index ea216335b7af..279c8a0fd054 100644
--- a/nixpkgs/pkgs/development/libraries/nlopt/default.nix
+++ b/nixpkgs/pkgs/development/libraries/nlopt/default.nix
@@ -27,6 +27,11 @@ stdenv.mkDerivation rec {
     "OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct"
   ];
 
+  postFixup = ''
+    substituteInPlace $out/lib/cmake/nlopt/NLoptLibraryDepends.cmake --replace \
+      'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/' 'INTERFACE_INCLUDE_DIRECTORIES "'
+  '';
+
   meta = {
     homepage = "https://nlopt.readthedocs.io/en/latest/";
     description = "Free open-source library for nonlinear optimization";