Merge #134546: opencv: fix OpenCL linkage for 4.x

This commit is contained in:
Vladimír Čunát 2021-10-16 14:20:02 +02:00
commit 2d89598250
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -13,6 +13,7 @@
, gflags , gflags
, protobuf , protobuf
, config , config
, ocl-icd
, enableJPEG ? true , enableJPEG ? true
, libjpeg , libjpeg
@ -313,6 +314,8 @@ stdenv.mkDerivation {
] ++ lib.optionals stdenv.isDarwin [ ] ++ lib.optionals stdenv.isDarwin [
"-DWITH_OPENCL=OFF" "-DWITH_OPENCL=OFF"
"-DWITH_LAPACK=OFF" "-DWITH_LAPACK=OFF"
] ++ lib.optionals (!stdenv.isDarwin) [
"-DOPENCL_LIBRARY=${ocl-icd}/lib/libOpenCL.so"
] ++ lib.optionals enablePython [ ] ++ lib.optionals enablePython [
"-DOPENCV_SKIP_PYTHON_LOADER=ON" "-DOPENCV_SKIP_PYTHON_LOADER=ON"
]; ];