endif
# Installation hooks:
-define OPENCV3_CLEAN_INSTALL_DOC
- $(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/doc
+define OPENCV3_CLEAN_INSTALL_LICENSE
+ $(RM) -fr $(TARGET_DIR)/usr/share/licenses/opencv3
endef
-OPENCV3_POST_INSTALL_TARGET_HOOKS += OPENCV3_CLEAN_INSTALL_DOC
+OPENCV3_POST_INSTALL_TARGET_HOOKS += OPENCV3_CLEAN_INSTALL_LICENSE
define OPENCV3_CLEAN_INSTALL_CMAKE
- $(RM) -f $(TARGET_DIR)/usr/share/OpenCV/OpenCVConfig*.cmake
+ $(RM) -f $(TARGET_DIR)/usr/share/OpenCV/OpenCV*.cmake
endef
OPENCV3_POST_INSTALL_TARGET_HOOKS += OPENCV3_CLEAN_INSTALL_CMAKE
+define OPENCV3_CLEAN_INSTALL_VALGRIND
+ $(RM) -f $(TARGET_DIR)/usr/share/OpenCV/valgrind*
+endef
+OPENCV3_POST_INSTALL_TARGET_HOOKS += OPENCV3_CLEAN_INSTALL_VALGRIND
+
ifneq ($(BR2_PACKAGE_OPENCV3_INSTALL_DATA),y)
define OPENCV3_CLEAN_INSTALL_DATA
$(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/haarcascades \