On Thu, Jan 02, 2020 at 02:54:59PM +0100, Marian Cichy wrote:
> Signed-off-by: Marian Cichy
> ---
> rules/opencv.in | 5 +
> rules/opencv.make | 22 --
> 2 files changed, 25 insertions(+), 2 deletions(-)
>
> diff --git a/rules/opencv.in b/rules/opencv.in
> index 37fd32758..ac096d60c 100644
> --- a/rules/opencv.in
> +++ b/rules/opencv.in
> @@ -131,4 +131,9 @@ config OPENCV_QT
> help
> QT GUI Support
>
> +config OPENCV_EXAMPLES
> + bool
> + prompt "Build Examples"
> + help
> + Build the OpenCV example applications and install them into
> /usr/share/opencv/examples.
> endif
> diff --git a/rules/opencv.make b/rules/opencv.make
> index 44ee4fd0c..fc6243753 100644
> --- a/rules/opencv.make
> +++ b/rules/opencv.make
> @@ -39,7 +39,7 @@ OPENCV_CONF_OPT := \
> -DANT_EXECUTABLE:FILEPATH= \
> -DPYTHON_EXECUTABLE= \
> -DBUILD_DOCS:BOOL=OFF \
> - -DBUILD_EXAMPLES:BOOL=OFF \
> + -DBUILD_EXAMPLES:BOOL=$(call ptx/onoff, PTXCONF_OPENCV_EXAMPLES) \
> -DBUILD_PACKAGE:BOOL=OFF \
> -DCMAKE_BUILD_TYPE=Release \
> -DBUILD_SHARED_LIBS:BOOL=ON \
> @@ -122,6 +122,22 @@ OPENCV_CONF_OPT := \
> -DWITH_OPENGL:BOOL=OFF \
> -DWITH_QT:BOOL=$(call ptx/ifdef,PTXCONF_OPENCV_QT,4,OFF)
>
> +
> +OPENCV_BUILD_DIR := $(OPENCV_DIR)-build
> +
> +$(STATEDIR)/opencv.install:
> +
> +
No empty lines here.
> + @$(call targetinfo)
> + @$(call world/install, OPENCV)
> +ifdef PTXCONF_OPENCV_EXAMPLES
> + @mkdir -p $(OPENCV_PKGDIR)/usr/share/opencv/examples
> + find $(OPENCV_BUILD_DIR)/bin -type f | while read file; do \
> + install -m 755 "$$file" $(OPENCV_PKGDIR)/usr/share/opencv/examples; \
@find ... \
install -v -m755 ...
> + done
> +endif
> + @$(call touch)
> +
> #
>
> # Target-Install
> #
>
> @@ -153,7 +169,9 @@ $(STATEDIR)/opencv.targetinstall:
>
> @$(foreach lib, $(OPENCV_LIBS-y), \
> $(call install_lib, opencv, 0, 0, 0644, $(lib));)
> -
> +ifdef PTXCONF_OPENCV_EXAMPLES
> + $(call install_tree, opencv, 0, 0,
> $(OPENCV_PKGDIR)/usr/share/opencv/examples, /usr/share/opencv/examples)
$(call install_tree, opencv, 0, 0, -, /usr/share/opencv/examples)
Michael
> +endif
> @$(call install_finish, opencv)
>
> @$(call touch)
> --
> 2.20.1
>
>
> ___
> ptxdist mailing list
> ptxdist@pengutronix.de
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- |
___
ptxdist mailing list
ptxdist@pengutronix.de