* [Buildroot] [PATCH 0/5 v10] OpenCV bump (branch yem/smartin/opencv)
@ 2015-07-05 21:54 Yann E. MORIN
2015-07-05 21:54 ` [Buildroot] [PATCH 1/5 v10] package/opencv: add a choice for selecting the gui toolkit Yann E. MORIN
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Yann E. MORIN @ 2015-07-05 21:54 UTC (permalink / raw)
To: buildroot
Hello All!
Yet another round for the bump of OpenCV package from Samuel, with the
remaining patches touching the GUI toolkit support.
Patches 1 and 2 preapres for addign more GUI tookits.
Patches 3 and 4 adds new tookits.
Patch 5 adds OpenGL support.
Changes v9 -> v10:
- split a patch in two
- tweak some commit logs
- fix extra dependencies
Regards,
Yann E. MORIN.
The following changes since commit ff89e1eb0cdb8ebe9cbd2cf944f43ed132afcb17:
wine: fix sane related build failure (2015-07-05 17:16:40 +0200)
are available in the git repository at:
git://git.busybox.net/~ymorin/git/buildroot yem/smartin/opencv
for you to fetch changes up to 582a50073ade12575a280f6aea96095597f61759:
package/opencv: add opengl support (2015-07-05 23:49:16 +0200)
----------------------------------------------------------------
Samuel Martin (5):
package/opencv: add a choice for selecting the gui toolkit
package/opencv: depends on GUI toolkits, rather than select them
package/opencv: add qt5 support
package/opencv: add gtk3 support
package/opencv: add opengl support
package/opencv/Config.in | 99 +++++++++++++++++++++++++++++++++++++-----------
package/opencv/opencv.mk | 29 ++++++++++++--
2 files changed, 101 insertions(+), 27 deletions(-)
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/5 v10] package/opencv: add a choice for selecting the gui toolkit
2015-07-05 21:54 [Buildroot] [PATCH 0/5 v10] OpenCV bump (branch yem/smartin/opencv) Yann E. MORIN
@ 2015-07-05 21:54 ` Yann E. MORIN
2015-07-05 21:54 ` [Buildroot] [PATCH 2/5 v10] package/opencv: depends on GUI toolkits, rather than select them Yann E. MORIN
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2015-07-05 21:54 UTC (permalink / raw)
To: buildroot
From: Samuel Martin <s.martin49@gmail.com>
In OpenCV, only one GUI toolkit may be used at any one time, so group
the two existing options into a choice to make this situation explicit.
This will also be useful when we later add support for Qt5 and gtk3.
Suggested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[yann.morin.1998 at free.fr: tweak commit log]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
Changes v9 -> v10:
- tweak commit log (Yann)
---
package/opencv/Config.in | 67 +++++++++++++++++++++++++++++++-----------------
1 file changed, 44 insertions(+), 23 deletions(-)
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 079730e..c3542c4 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -52,6 +52,50 @@ config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
Include opencv_highgui (high-level gui and media i/o) module into the
OpenCV build.
+choice
+ prompt "gui toolkit"
+ depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+ help
+ GUI toolkit to be used by the opencv_highgui module.
+
+config BR2_PACKAGE_OPENCV_GUI_NONE
+ bool "none"
+
+config BR2_PACKAGE_OPENCV_WITH_GTK
+ bool "gtk2"
+ depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
+ depends on BR2_USE_MMU # libgtk2 -> libglib2
+ depends on BR2_USE_WCHAR # libgtk2 -> libglib2
+ depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2 -> libglib2
+ depends on BR2_INSTALL_LIBSTDCPP
+ depends on BR2_PACKAGE_XORG7
+ select BR2_PACKAGE_LIBGTK2
+
+comment "gtk2 needs X.org and a toolchain w/ wchar, threads, C++"
+ depends on BR2_USE_MMU # libgtk2 -> glib2
+ depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
+ depends on !BR2_PACKAGE_XORG7 || \
+ !BR2_USE_WCHAR || \
+ !BR2_TOOLCHAIN_HAS_THREADS || \
+ !BR2_INSTALL_LIBSTDCPP
+
+config BR2_PACKAGE_OPENCV_WITH_QT
+ bool "qt4"
+ depends on BR2_INSTALL_LIBSTDCPP
+ depends on BR2_USE_MMU # qt
+ select BR2_PACKAGE_QT
+ select BR2_PACKAGE_QT_STL
+ select BR2_PACKAGE_QT_GUI_MODULE
+ select BR2_PACKAGE_QT_TEST
+ help
+ Use Qt with QtTest module and STL support
+
+comment "qt4 needs a toolchain w/ C++"
+ depends on BR2_USE_MMU # qt
+ depends on !BR2_INSTALL_LIBSTDCPP
+
+endchoice
+
config BR2_PACKAGE_OPENCV_LIB_IMGCODECS
bool "imgcodecs"
select BR2_PACKAGE_OPENCV_LIB_IMGPROC
@@ -209,17 +253,6 @@ comment "gstreamer-1.x support needs a toolchain w/ wchar, threads"
endchoice
-config BR2_PACKAGE_OPENCV_WITH_GTK
- bool "gtk support"
- depends on BR2_PACKAGE_XORG7
- depends on BR2_USE_WCHAR # libgtk2 -> libglib2
- depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2 -> libglib2
- depends on BR2_INSTALL_LIBSTDCPP
- depends on BR2_USE_MMU # libgtk2 -> glib2
- depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
- depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
- select BR2_PACKAGE_LIBGTK2
-
config BR2_PACKAGE_OPENCV_WITH_JASPER
bool "jpeg2000 support"
select BR2_PACKAGE_JASPER
@@ -242,18 +275,6 @@ config BR2_PACKAGE_OPENCV_WITH_PNG
help
Use shared libpng from the target system.
-config BR2_PACKAGE_OPENCV_WITH_QT
- bool "qt backend support"
- depends on BR2_INSTALL_LIBSTDCPP
- depends on BR2_USE_MMU # qt
- depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
- select BR2_PACKAGE_QT
- select BR2_PACKAGE_QT_STL
- select BR2_PACKAGE_QT_GUI_MODULE
- select BR2_PACKAGE_QT_TEST
- help
- Use Qt with QtTest module and STL support
-
config BR2_PACKAGE_OPENCV_WITH_TIFF
bool "tiff support"
select BR2_PACKAGE_TIFF
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/5 v10] package/opencv: depends on GUI toolkits, rather than select them
2015-07-05 21:54 [Buildroot] [PATCH 0/5 v10] OpenCV bump (branch yem/smartin/opencv) Yann E. MORIN
2015-07-05 21:54 ` [Buildroot] [PATCH 1/5 v10] package/opencv: add a choice for selecting the gui toolkit Yann E. MORIN
@ 2015-07-05 21:54 ` Yann E. MORIN
2015-07-05 21:54 ` [Buildroot] [PATCH 3/5 v10] package/opencv: add qt5 support Yann E. MORIN
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2015-07-05 21:54 UTC (permalink / raw)
To: buildroot
From: Samuel Martin <s.martin49@gmail.com>
Currently, we only support either Qt4 or gtk2, but OpenCV also
additionally supports Qt5 or gtk3, making for a choice of four
toolkits, one of: Qt4, Qt5, gtk3, gtk2 (and obviously, none).
Since Buildroot does not support coexistence of Qt4 and Qt5, we
can no longer select one and depend on the other, like so:
config BR2_PKG_OCV_WITH_QT4
bool "Qt4"
depends on !BR2_PKG_QT5
select BR2_PKG_QT
config BR2_PKG_OCV_WITH_QT5
bool "Qt5"
depends on !BR2_PKG_QT
select BR2_PKG_QT5
otherwise, we'd get a circular dependency chain in Kconfig, which would
complain with:
package/opencv/Config.in:57:error: recursive dependency detected!
package/opencv/Config.in:57: choice <choice> contains symbol BR2_PKG_OCV_WITH_QT5
package/opencv/Config.in:111: symbol BR2_PKG_OCV_WITH_QT5 depends on BR2_PKG_QT
package/qt/Config.in:5: symbol BR2_PKG_QT is selected by BR2_PKG_OCV_WITH_QT
package/opencv/Config.in:98: symbol BR2_PKG_OCV_WITH_QT is part of choice <choice>
Instead, we need to depend on either Qt version.
So, to have a consistent choice, we make all support for GUI toolkits
actually depend on the toolkit, rather than select it.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[yann.morin.1998 at free.fr: split-out the switch-selects-to-depends hunk
from the add-qt5 hunk]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Changes v9 -> v10:
- split this hunk out of next patch (Yann)
---
package/opencv/Config.in | 25 +++++++------------------
1 file changed, 7 insertions(+), 18 deletions(-)
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index c3542c4..5dd39ca 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -63,36 +63,25 @@ config BR2_PACKAGE_OPENCV_GUI_NONE
config BR2_PACKAGE_OPENCV_WITH_GTK
bool "gtk2"
- depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
- depends on BR2_USE_MMU # libgtk2 -> libglib2
- depends on BR2_USE_WCHAR # libgtk2 -> libglib2
- depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2 -> libglib2
- depends on BR2_INSTALL_LIBSTDCPP
- depends on BR2_PACKAGE_XORG7
- select BR2_PACKAGE_LIBGTK2
+ depends on BR2_PACKAGE_LIBGTK2
-comment "gtk2 needs X.org and a toolchain w/ wchar, threads, C++"
+comment "gtk2 support needs libgtk2"
depends on BR2_USE_MMU # libgtk2 -> glib2
depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
- depends on !BR2_PACKAGE_XORG7 || \
- !BR2_USE_WCHAR || \
- !BR2_TOOLCHAIN_HAS_THREADS || \
- !BR2_INSTALL_LIBSTDCPP
+ depends on !BR2_PACKAGE_LIBGTK2
config BR2_PACKAGE_OPENCV_WITH_QT
bool "qt4"
- depends on BR2_INSTALL_LIBSTDCPP
- depends on BR2_USE_MMU # qt
- select BR2_PACKAGE_QT
+ depends on BR2_PACKAGE_QT
select BR2_PACKAGE_QT_STL
select BR2_PACKAGE_QT_GUI_MODULE
select BR2_PACKAGE_QT_TEST
help
- Use Qt with QtTest module and STL support
+ Use Qt4 with QtTest and QtGui modules and STL support, as GUI toolkit.
-comment "qt4 needs a toolchain w/ C++"
+comment "qt4 support needs qt"
depends on BR2_USE_MMU # qt
- depends on !BR2_INSTALL_LIBSTDCPP
+ depends on !BR2_PACKAGE_QT
endchoice
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 3/5 v10] package/opencv: add qt5 support
2015-07-05 21:54 [Buildroot] [PATCH 0/5 v10] OpenCV bump (branch yem/smartin/opencv) Yann E. MORIN
2015-07-05 21:54 ` [Buildroot] [PATCH 1/5 v10] package/opencv: add a choice for selecting the gui toolkit Yann E. MORIN
2015-07-05 21:54 ` [Buildroot] [PATCH 2/5 v10] package/opencv: depends on GUI toolkits, rather than select them Yann E. MORIN
@ 2015-07-05 21:54 ` Yann E. MORIN
2015-07-06 9:47 ` Thomas Petazzoni
2015-07-05 21:54 ` [Buildroot] [PATCH 4/5 v10] package/opencv: add gtk3 support Yann E. MORIN
` (2 subsequent siblings)
5 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2015-07-05 21:54 UTC (permalink / raw)
To: buildroot
From: Samuel Martin <s.martin49@gmail.com>
Starting with the 2.4.6 release, OpenCV supports either Qt4 or Qt5 as GUI
toolkit, so add Qt5 in the GUI toolkit choice.
When Qt4 is enabled (and thus Qt5 is hidden and disabled), no need to
show a comment stating "Qt5 support needs Qt5", because Qt5 is not
selectable.
Conversely, when Qt5 is enabled and Qt4 is not, then no need to show a
comment stating "Qt4 support needs Qt4", because enabling Qt4 would
disable Qt5.
So, we only show the comments when neither toolkit is enabled.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
[yann.morin.1998 at free.fr: split-out the Qt5 hunk from the
switch-selects-to-depends hunk]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
Changes v9 -> v10;
- split this patch in two, one to switch depends->select (previous
patch) and one to add Qt5 (this patch) (Yann)
---
package/opencv/Config.in | 16 +++++++++++++++-
package/opencv/opencv.mk | 11 +++++++++--
2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 5dd39ca..5e8f189 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -81,7 +81,21 @@ config BR2_PACKAGE_OPENCV_WITH_QT
comment "qt4 support needs qt"
depends on BR2_USE_MMU # qt
- depends on !BR2_PACKAGE_QT
+ depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
+
+config BR2_PACKAGE_OPENCV_WITH_QT5
+ bool "qt5"
+ depends on BR2_PACKAGE_QT5
+ select BR2_PACKAGE_QT5BASE
+ select BR2_PACKAGE_QT5BASE_CONCURRENT
+ select BR2_PACKAGE_QT5BASE_GUI
+ select BR2_PACKAGE_QT5BASE_WIDGETS
+ help
+ Use Qt5 with base, concurrent, test, gui and widgets components, as GUI
+ toolkit.
+
+comment "qt5 support needs qt5"
+ depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
endchoice
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 0e5cf77..98e1614 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -266,11 +266,18 @@ else
OPENCV_CONF_OPTS += -DWITH_PNG=OFF
endif
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT)$(BR2_PACKAGE_OPENCV_WITH_QT5),)
+OPENCV_CONF_OPTS += -DWITH_QT=OFF
+endif
+
ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y)
OPENCV_CONF_OPTS += -DWITH_QT=4
OPENCV_DEPENDENCIES += qt
-else
-OPENCV_CONF_OPTS += -DWITH_QT=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT5),y)
+OPENCV_CONF_OPTS += -DWITH_QT=5
+OPENCV_DEPENDENCIES += qt5base
endif
ifeq ($(BR2_PACKAGE_OPENCV_WITH_TIFF),y)
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 4/5 v10] package/opencv: add gtk3 support
2015-07-05 21:54 [Buildroot] [PATCH 0/5 v10] OpenCV bump (branch yem/smartin/opencv) Yann E. MORIN
` (2 preceding siblings ...)
2015-07-05 21:54 ` [Buildroot] [PATCH 3/5 v10] package/opencv: add qt5 support Yann E. MORIN
@ 2015-07-05 21:54 ` Yann E. MORIN
2015-07-05 21:54 ` [Buildroot] [PATCH 5/5 v10] package/opencv: add opengl support Yann E. MORIN
2015-07-06 9:49 ` [Buildroot] [PATCH 0/5 v10] OpenCV bump (branch yem/smartin/opencv) Thomas Petazzoni
5 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2015-07-05 21:54 UTC (permalink / raw)
To: buildroot
From: Samuel Martin <s.martin49@gmail.com>
OpenCV now also supports gtk3 as a GUI toolkit, in addition to gtk2,
but only one may be enabled at a time.
So, add gtk3 in the choice to select the GUI toolkit.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[yann.morin.1998 at free.fr: drop the superfluous depends-on for the
kconfig symbol, since they're no longer needed now we depend-on rather
than select]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
Chanmge v9 -> v10;
- drop superfluous depends-on (Yann)
---
package/opencv/Config.in | 9 +++++++++
package/opencv/opencv.mk | 11 +++++++++--
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 5e8f189..6ae74b4 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -70,6 +70,15 @@ comment "gtk2 support needs libgtk2"
depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo
depends on !BR2_PACKAGE_LIBGTK2
+config BR2_PACKAGE_OPENCV_WITH_GTK3
+ bool "gtk3"
+ depends on BR2_PACKAGE_LIBGTK3
+
+comment "gtk3 support needs libgtk3"
+ depends on BR2_USE_MMU # libgtk3 -> glib2
+ depends on BR2_ARCH_HAS_ATOMICS # libgtk3 -> cairo
+ depends on !BR2_PACKAGE_LIBGTK3
+
config BR2_PACKAGE_OPENCV_WITH_QT
bool "qt4"
depends on BR2_PACKAGE_QT
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 98e1614..c788aeb 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -236,11 +236,18 @@ else
OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF
endif
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK)$(BR2_PACKAGE_OPENCV_WITH_GTK3),)
+OPENCV_CONF_OPTS += -DWITH_GTK=OFF -DWITH_GTK_2_X=OFF
+endif
+
ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK),y)
OPENCV_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=ON
OPENCV_DEPENDENCIES += libgtk2
-else
-OPENCV_CONF_OPTS += -DWITH_GTK=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK3),y)
+OPENCV_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=OFF
+OPENCV_DEPENDENCIES += libgtk3
endif
ifeq ($(BR2_PACKAGE_OPENCV_WITH_JASPER),y)
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 5/5 v10] package/opencv: add opengl support
2015-07-05 21:54 [Buildroot] [PATCH 0/5 v10] OpenCV bump (branch yem/smartin/opencv) Yann E. MORIN
` (3 preceding siblings ...)
2015-07-05 21:54 ` [Buildroot] [PATCH 4/5 v10] package/opencv: add gtk3 support Yann E. MORIN
@ 2015-07-05 21:54 ` Yann E. MORIN
2015-07-06 9:49 ` [Buildroot] [PATCH 0/5 v10] OpenCV bump (branch yem/smartin/opencv) Thomas Petazzoni
5 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2015-07-05 21:54 UTC (permalink / raw)
To: buildroot
From: Samuel Martin <s.martin49@gmail.com>
In OpenCV, OpenGL is only used by highgui module.
OpenGL support is done using extensions from 3rd party framework: either
Qt5OpenGL with Qt5 (with GL support only, not GLES); or gtkglext (which
is not available in Buildroot) with gtk2
So, make OpenGL knob a sub-option of the Qt5 support option.
Note: we enclose both the GUI toolkit choice and the GL option in an
if-block, so that the GL option gets properly indented; having it
depend on WITH_QT5 is not enough, because it does not directly follow
it, so kconfig would not consider it for indenting.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
[yann.morin.1998 at free.fr: tweak commit log about the if-block]
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
Changes v9 -> v10:
- slightly expand commit log (Yann)
---
package/opencv/Config.in | 22 +++++++++++++++++++++-
package/opencv/opencv.mk | 7 +++++++
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 6ae74b4..0b5d1ac 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -52,9 +52,10 @@ config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
Include opencv_highgui (high-level gui and media i/o) module into the
OpenCV build.
+if BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+
choice
prompt "gui toolkit"
- depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
help
GUI toolkit to be used by the opencv_highgui module.
@@ -108,6 +109,25 @@ comment "qt5 support needs qt5"
endchoice
+config BR2_PACKAGE_OPENCV_WITH_OPENGL
+ bool "opengl support"
+ # OpenGL support done using Qt5OpenGL, so depends on WITH_QT5
+ depends on BR2_PACKAGE_OPENCV_WITH_QT5
+ # OpenGL support requires Qt5OpenGL with GL support, not GLES
+ depends on BR2_PACKAGE_QT5_GL_AVAILABLE
+ depends on BR2_PACKAGE_HAS_LIBGL
+ select BR2_PACKAGE_QT5BASE_OPENGL
+ help
+ Enable OpenGL for UI.
+
+comment "opengl support needs an OpenGL provider"
+ depends on BR2_PACKAGE_OPENCV_WITH_QT5
+ depends on !BR2_PACKAGE_QT5_GL_AVAILABLE || \
+ !BR2_PACKAGE_HAS_LIBGL
+
+endif # BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+
+
config BR2_PACKAGE_OPENCV_LIB_IMGCODECS
bool "imgcodecs"
select BR2_PACKAGE_OPENCV_LIB_IMGPROC
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index c788aeb..bb1bcd8 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -264,6 +264,13 @@ else
OPENCV_CONF_OPTS += -DWITH_JPEG=OFF
endif
+ifeq ($(BR2_PACKAGE_OPENCV_WITH_OPENGL),y)
+OPENCV_CONF_OPTS += -DWITH_OPENGL=ON
+OPENCV_DEPENDENCIES += libgl
+else
+OPENCV_CONF_OPTS += -DWITH_OPENGL=OFF
+endif
+
OPENCV_CONF_OPTS += -DWITH_OPENMP=$(if $(BR2_GCC_ENABLE_OPENMP),ON,OFF)
ifeq ($(BR2_PACKAGE_OPENCV_WITH_PNG),y)
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 3/5 v10] package/opencv: add qt5 support
2015-07-05 21:54 ` [Buildroot] [PATCH 3/5 v10] package/opencv: add qt5 support Yann E. MORIN
@ 2015-07-06 9:47 ` Thomas Petazzoni
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2015-07-06 9:47 UTC (permalink / raw)
To: buildroot
Dear Yann E. MORIN,
On Sun, 5 Jul 2015 23:54:46 +0200, Yann E. MORIN wrote:
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 0e5cf77..98e1614 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -266,11 +266,18 @@ else
> OPENCV_CONF_OPTS += -DWITH_PNG=OFF
> endif
>
> +ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT)$(BR2_PACKAGE_OPENCV_WITH_QT5),)
> +OPENCV_CONF_OPTS += -DWITH_QT=OFF
> +endif
> +
> ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y)
> OPENCV_CONF_OPTS += -DWITH_QT=4
> OPENCV_DEPENDENCIES += qt
> -else
> -OPENCV_CONF_OPTS += -DWITH_QT=OFF
> +endif
> +
> +ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT5),y)
> +OPENCV_CONF_OPTS += -DWITH_QT=5
> +OPENCV_DEPENDENCIES += qt5base
> endif
I think something like:
ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y)
OPENCV_CONF_OPTS += -DWITH_QT=4
OPENCV_DEPENDENCIES += qt
else ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT5),y)
OPENCV_CONF_OPTS += -DWITH_QT=5
OPENCV_DEPENDENCIES += qt5base
else
OPENCV_CONF_OPTS += -DWITH_QT=OFF
endif
Would probably have been more logical. But oh well, we're already at
the 10th iteration, so I'll commit as is, and such improvements can be
done as follow-up patches.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 0/5 v10] OpenCV bump (branch yem/smartin/opencv)
2015-07-05 21:54 [Buildroot] [PATCH 0/5 v10] OpenCV bump (branch yem/smartin/opencv) Yann E. MORIN
` (4 preceding siblings ...)
2015-07-05 21:54 ` [Buildroot] [PATCH 5/5 v10] package/opencv: add opengl support Yann E. MORIN
@ 2015-07-06 9:49 ` Thomas Petazzoni
5 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2015-07-06 9:49 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 5 Jul 2015 23:54:39 +0200, Yann E. MORIN wrote:
> Samuel Martin (5):
> package/opencv: add a choice for selecting the gui toolkit
> package/opencv: depends on GUI toolkits, rather than select them
> package/opencv: add qt5 support
> package/opencv: add gtk3 support
> package/opencv: add opengl support
All applied, thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-07-06 9:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-05 21:54 [Buildroot] [PATCH 0/5 v10] OpenCV bump (branch yem/smartin/opencv) Yann E. MORIN
2015-07-05 21:54 ` [Buildroot] [PATCH 1/5 v10] package/opencv: add a choice for selecting the gui toolkit Yann E. MORIN
2015-07-05 21:54 ` [Buildroot] [PATCH 2/5 v10] package/opencv: depends on GUI toolkits, rather than select them Yann E. MORIN
2015-07-05 21:54 ` [Buildroot] [PATCH 3/5 v10] package/opencv: add qt5 support Yann E. MORIN
2015-07-06 9:47 ` Thomas Petazzoni
2015-07-05 21:54 ` [Buildroot] [PATCH 4/5 v10] package/opencv: add gtk3 support Yann E. MORIN
2015-07-05 21:54 ` [Buildroot] [PATCH 5/5 v10] package/opencv: add opengl support Yann E. MORIN
2015-07-06 9:49 ` [Buildroot] [PATCH 0/5 v10] OpenCV bump (branch yem/smartin/opencv) Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox