${CXX} $RECIPE_DIR/test.cpp -I$PREFIX/include  -L$PREFIX/lib -o test
[ $(./test) != "$PKG_VERSION" ] && exit 1

[ $($PYTHON -c 'import cv2; print(cv2.__version__)') != "$PKG_VERSION" ] && exit 1


set -ex



test -f $PREFIX/lib/libopencv_aruco.dylib
test -f $PREFIX/lib/libopencv_bgsegm.dylib
test -f $PREFIX/lib/libopencv_calib3d.dylib
test -f $PREFIX/lib/libopencv_ccalib.dylib
test -f $PREFIX/lib/libopencv_core.dylib
test -f $PREFIX/lib/libopencv_datasets.dylib
test -f $PREFIX/lib/libopencv_dnn.dylib
test -f $PREFIX/lib/libopencv_dpm.dylib
test -f $PREFIX/lib/libopencv_face.dylib
test -f $PREFIX/lib/libopencv_features2d.dylib
test -f $PREFIX/lib/libopencv_flann.dylib
test -f $PREFIX/lib/libopencv_fuzzy.dylib
test -f $PREFIX/lib/libopencv_highgui.dylib
test -f $PREFIX/lib/libopencv_imgcodecs.dylib
test -f $PREFIX/lib/libopencv_imgproc.dylib
test -f $PREFIX/lib/libopencv_line_descriptor.dylib
test -f $PREFIX/lib/libopencv_ml.dylib
test -f $PREFIX/lib/libopencv_objdetect.dylib
test -f $PREFIX/lib/libopencv_optflow.dylib
test -f $PREFIX/lib/libopencv_phase_unwrapping.dylib
test -f $PREFIX/lib/libopencv_photo.dylib
test -f $PREFIX/lib/libopencv_plot.dylib
test -f $PREFIX/lib/libopencv_reg.dylib
test -f $PREFIX/lib/libopencv_rgbd.dylib
test -f $PREFIX/lib/libopencv_saliency.dylib
test -f $PREFIX/lib/libopencv_shape.dylib
test -f $PREFIX/lib/libopencv_stereo.dylib
test -f $PREFIX/lib/libopencv_stitching.dylib
test -f $PREFIX/lib/libopencv_structured_light.dylib
test -f $PREFIX/lib/libopencv_superres.dylib
test -f $PREFIX/lib/libopencv_surface_matching.dylib
test -f $PREFIX/lib/libopencv_text.dylib
test -f $PREFIX/lib/libopencv_tracking.dylib
test -f $PREFIX/lib/libopencv_video.dylib
test -f $PREFIX/lib/libopencv_videoio.dylib
test -f $PREFIX/lib/libopencv_videostab.dylib
test -f $PREFIX/lib/libopencv_xfeatures2d.dylib
test -f $PREFIX/lib/libopencv_ximgproc.dylib
test -f $PREFIX/lib/libopencv_xobjdetect.dylib
test -f $PREFIX/lib/libopencv_xphoto.dylib
conda inspect linkages -p $PREFIX opencv
exit 0
