Backport of "opencv: set opencv_dep when option is disabled (#1406)" into 1.18
Backport of !1570 (merged) "opencv: set opencv_dep when option is disabled (#1406 (closed))".
Commits:
- 52ef1925 opencv: set opencv_dep when option is disabled (#1406 (closed))