Merge pull request #25219 from knedlsepp/fix-opencv3-darwin
opencv3: Enable darwin build
This commit is contained in:
commit
390e2ea14f
@ -4,7 +4,7 @@
|
||||
, enablePNG ? true, libpng
|
||||
, enableTIFF ? true, libtiff
|
||||
, enableWebP ? true, libwebp
|
||||
, enableEXR ? true, openexr, ilmbase
|
||||
, enableEXR ? (!stdenv.isDarwin), openexr, ilmbase
|
||||
, enableJPEG2K ? true, jasper
|
||||
|
||||
, enableIpp ? false
|
||||
@ -16,6 +16,7 @@
|
||||
, enableGStreamer ? false, gst_all_1
|
||||
, enableEigen ? false, eigen
|
||||
, enableCuda ? false, cudatoolkit, gcc5
|
||||
, AVFoundation, Cocoa, QTKit
|
||||
}:
|
||||
|
||||
let
|
||||
@ -115,7 +116,7 @@ stdenv.mkDerivation rec {
|
||||
++ lib.optional enableEigen eigen
|
||||
++ lib.optionals enableCuda [ cudatoolkit gcc5 ]
|
||||
++ lib.optional enableContrib protobuf3_1
|
||||
;
|
||||
++ lib.optionals stdenv.isDarwin [ AVFoundation Cocoa QTKit ];
|
||||
|
||||
propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy;
|
||||
|
||||
@ -134,7 +135,8 @@ stdenv.mkDerivation rec {
|
||||
(opencvFlag "CUDA" enableCuda)
|
||||
(opencvFlag "CUBLAS" enableCuda)
|
||||
] ++ lib.optionals enableCuda [ "-DCUDA_FAST_MATH=ON" ]
|
||||
++ lib.optional enableContrib "-DBUILD_PROTOBUF=off";
|
||||
++ lib.optional enableContrib "-DBUILD_PROTOBUF=off"
|
||||
++ lib.optionals stdenv.isDarwin ["-DWITH_OPENCL=OFF" "-DWITH_LAPACK=OFF"];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@ -147,6 +149,6 @@ stdenv.mkDerivation rec {
|
||||
homepage = http://opencv.org/;
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [viric flosse mdaiter];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
platforms = with stdenv.lib.platforms; linux ++ darwin;
|
||||
};
|
||||
}
|
||||
|
@ -9326,7 +9326,9 @@ with pkgs;
|
||||
ffmpeg = ffmpeg_2;
|
||||
};
|
||||
|
||||
opencv3 = callPackage ../development/libraries/opencv/3.x.nix { };
|
||||
opencv3 = callPackage ../development/libraries/opencv/3.x.nix {
|
||||
inherit (darwin.apple_sdk.frameworks) AVFoundation Cocoa QTKit;
|
||||
};
|
||||
|
||||
# this ctl version is needed by openexr_viewers
|
||||
openexr_ctl = ctl;
|
||||
|
Loading…
Reference in New Issue
Block a user