mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 21:50:55 +00:00
Merge pull request #20154 from mdaiter/opencv3_extras
opencv3: enable cuda compilations
This commit is contained in:
commit
5de8637c4e
|
@ -14,6 +14,7 @@
|
|||
, enableFfmpeg ? false, ffmpeg
|
||||
, enableGStreamer ? false, gst_all_1
|
||||
, enableEigen ? false, eigen
|
||||
, enableCuda ? false, cudatoolkit, gcc49
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -74,6 +75,7 @@ stdenv.mkDerivation rec {
|
|||
++ lib.optional enableFfmpeg ffmpeg
|
||||
++ lib.optionals enableGStreamer (with gst_all_1; [ gstreamer gst-plugins-base ])
|
||||
++ lib.optional enableEigen eigen
|
||||
++ lib.optional enableCuda [ cudatoolkit gcc49 ]
|
||||
;
|
||||
|
||||
propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy;
|
||||
|
@ -90,7 +92,10 @@ stdenv.mkDerivation rec {
|
|||
(opencvFlag "JPEG" enableJPEG)
|
||||
(opencvFlag "PNG" enablePNG)
|
||||
(opencvFlag "OPENEXR" enableEXR)
|
||||
] ++ lib.optionals enableContrib [ "-DOPENCV_EXTRA_MODULES_PATH=${contribSrc}/modules" ];
|
||||
(opencvFlag "CUDA" enableCuda)
|
||||
(opencvFlag "CUBLAS" enableCuda)
|
||||
] ++ lib.optionals enableContrib [ "-DOPENCV_EXTRA_MODULES_PATH=${contribSrc}/modules" ]
|
||||
++ lib.optionals enableCuda [ "-DCUDA_FAST_MATH=ON" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue