Merge pull request #256444 from delroth/opencv-darwin-unvendor

opencv3,opencv4: disable some unnecessary vendoring on Darwin
This commit is contained in:
Pierre Bourdon 2023-09-27 23:23:45 +02:00 committed by GitHub
commit 5266b96d2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

View file

@ -250,6 +250,16 @@ stdenv.mkDerivation {
] ++ lib.optionals stdenv.isDarwin [
"-DWITH_OPENCL=OFF"
"-DWITH_LAPACK=OFF"
# Disable unnecessary vendoring that's enabled by default only for Darwin.
# Note that the opencvFlag feature flags listed above still take
# precedence, so we can safely list everything here.
"-DBUILD_ZLIB=OFF"
"-DBUILD_TIFF=OFF"
"-DBUILD_JASPER=OFF"
"-DBUILD_JPEG=OFF"
"-DBUILD_PNG=OFF"
"-DBUILD_WEBP=OFF"
] ++ lib.optionals enablePython [
"-DOPENCV_SKIP_PYTHON_LOADER=ON"
] ++ lib.optionals enableEigen [

View file

@ -424,6 +424,17 @@ stdenv.mkDerivation {
] ++ lib.optionals stdenv.isDarwin [
"-DWITH_OPENCL=OFF"
"-DWITH_LAPACK=OFF"
# Disable unnecessary vendoring that's enabled by default only for Darwin.
# Note that the opencvFlag feature flags listed above still take
# precedence, so we can safely list everything here.
"-DBUILD_ZLIB=OFF"
"-DBUILD_TIFF=OFF"
"-DBUILD_OPENJPEG=OFF"
"-DBUILD_JASPER=OFF"
"-DBUILD_JPEG=OFF"
"-DBUILD_PNG=OFF"
"-DBUILD_WEBP=OFF"
] ++ lib.optionals (!stdenv.isDarwin) [
"-DOPENCL_LIBRARY=${ocl-icd}/lib/libOpenCL.so"
] ++ lib.optionals enablePython [