${OPENCV_MODULE_${the_module}_DEPS} incorrectly populated (Bug #1909)
Description
OPENCV_MODULE_${the_module}_DEPS should contain all a module's dependencies, and dependencies are transitive, however:
OPENCV_MODULE_opencv_calib3d_DEPS contains opencv_features2d
and OPENCV_MODULE_opencv_features2d_DEPS contains opencv_highgui
BUT OPENCV_MODULE_opencv_calib3d_DEPS does NOT contain opencv_highgui
the same happens with opencv_stitching > opencv_features2d > opencv_highgui
Associated revisions
Merge pull request #1909 from alalek:ocl_tapi_perf
History
Updated by Del Thanil almost 13 years ago
To be more precise, dependencies aren't necessarily transitive (my bad) but calib3d and stitching explicitly depend on highgui (on Mac OS X, an `otool -L libopencv_calib3d.dylib` contains a link to libopencv_highgui.dylib).
Updated by Del Thanil almost 13 years ago
Again, to add precision, I forgot to mention that I was referring to the CMake files of the OpenCV project. The bug only creates problems when creating custom cmake builds.
Updated by Andrey Kamaev almost 13 years ago
- Optional module dependencies are not transitive by design.
opencv_calib3d
andopencv_stitching
modules do not really use any code fromopencv_highgui
.- Dependencies shown by
otool
are created by CMake default link rules. Normally CMake puts all inherited dependencies to the link command for inter-project dependencies.
If current behavior interferes with your work then, please, create a new feature request with clear rationale.
- Status changed from Open to Cancelled
- Category set to build/install
- Assignee set to Andrey Kamaev
Updated by Del Thanil almost 13 years ago
I've done some more research and this is a CMake bug:
If target A depends on a shared library B and B depends on a shared library C, then CMake will create linker directives to link A to both B and C, when it should only link A to B.
Sorry for improperly posting the bug here, I managed to find a workaround in my particular case.