* [Buildroot] [PATCH 1/1] package/opencv3: add protobuf option
@ 2020-01-11 15:01 Fabrice Fontaine
2020-01-11 16:14 ` Thomas Petazzoni
2020-01-12 21:45 ` Thomas Petazzoni
0 siblings, 2 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2020-01-11 15:01 UTC (permalink / raw)
To: buildroot
Currently, protobuf is built unconditionnally since version 3.3.0 and
https://github.com/opencv/opencv/commit/1c4c58d1b5b7430463281e8c8072e04245f561b0
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/opencv3/Config.in | 12 ++++++++++++
package/opencv3/opencv3.mk | 8 ++++++++
2 files changed, 20 insertions(+)
diff --git a/package/opencv3/Config.in b/package/opencv3/Config.in
index cf7763d4ae..fdd7152ee6 100644
--- a/package/opencv3/Config.in
+++ b/package/opencv3/Config.in
@@ -307,6 +307,18 @@ config BR2_PACKAGE_OPENCV3_WITH_PNG
help
Use shared libpng from the target system.
+config BR2_PACKAGE_OPENCV3_WITH_PROTOBUF
+ bool "protobuf support"
+ depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # protobuf
+ select BR2_PACKAGE_PROTOBUF
+ help
+ Use shared protobuf from the target system.
+
+comment "protobuf support needs a toolchain w/ gcc >= 4.8"
+ depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
+ depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
config BR2_PACKAGE_OPENCV3_WITH_TIFF
bool "tiff support"
select BR2_PACKAGE_TIFF
diff --git a/package/opencv3/opencv3.mk b/package/opencv3/opencv3.mk
index d38107f6e7..bac4c2fa11 100644
--- a/package/opencv3/opencv3.mk
+++ b/package/opencv3/opencv3.mk
@@ -198,6 +198,7 @@ OPENCV3_CONF_OPTS += \
-DBUILD_JPEG=OFF \
-DBUILD_OPENEXR=OFF \
-DBUILD_PNG=OFF \
+ -DBUILD_PROTOBUF=OFF \
-DBUILD_TIFF=OFF \
-DBUILD_ZLIB=OFF \
-DINSTALL_C_EXAMPLES=OFF \
@@ -293,6 +294,13 @@ else
OPENCV3_CONF_OPTS += -DWITH_PNG=OFF
endif
+ifeq ($(BR2_PACKAGE_OPENCV3_WITH_PROTOBUF),y)
+OPENCV3_CONF_OPTS += -DWITH_PROTOBUF=ON
+OPENCV3_DEPENDENCIES += protobuf
+else
+OPENCV3_CONF_OPTS += -DWITH_PROTOBUF=OFF
+endif
+
ifeq ($(BR2_PACKAGE_OPENCV3_WITH_QT5),y)
OPENCV3_CONF_OPTS += -DWITH_QT=5
OPENCV3_DEPENDENCIES += qt5base
--
2.24.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] package/opencv3: add protobuf option
2020-01-11 15:01 [Buildroot] [PATCH 1/1] package/opencv3: add protobuf option Fabrice Fontaine
@ 2020-01-11 16:14 ` Thomas Petazzoni
2020-01-11 16:21 ` Fabrice Fontaine
2020-01-12 21:45 ` Thomas Petazzoni
1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2020-01-11 16:14 UTC (permalink / raw)
To: buildroot
On Sat, 11 Jan 2020 16:01:43 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Currently, protobuf is built unconditionnally since version 3.3.0 and
> https://github.com/opencv/opencv/commit/1c4c58d1b5b7430463281e8c8072e04245f561b0
If I understand correctly, what you meant is:
Since version 3.3.0 and its commit
https://github.com/opencv/opencv/commit/1c4c58d1b5b7430463281e8c8072e04245f561b0,
opencv3 bundles its own copy of protobuf. Instead of using the bundled
protobuf library, this commit disables building protobuf
(BUILD_PROTOBUF=OFF) and instead uses the protobuf Buildroot package
(using the WITH_PROTOBUF=ON/OFF option).
Is that correct ?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] package/opencv3: add protobuf option
2020-01-11 16:14 ` Thomas Petazzoni
@ 2020-01-11 16:21 ` Fabrice Fontaine
0 siblings, 0 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2020-01-11 16:21 UTC (permalink / raw)
To: buildroot
Le sam. 11 janv. 2020 ? 17:14, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> a ?crit :
>
> On Sat, 11 Jan 2020 16:01:43 +0100
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>
> > Currently, protobuf is built unconditionnally since version 3.3.0 and
> > https://github.com/opencv/opencv/commit/1c4c58d1b5b7430463281e8c8072e04245f561b0
>
> If I understand correctly, what you meant is:
>
> Since version 3.3.0 and its commit
> https://github.com/opencv/opencv/commit/1c4c58d1b5b7430463281e8c8072e04245f561b0,
> opencv3 bundles its own copy of protobuf. Instead of using the bundled
> protobuf library, this commit disables building protobuf
> (BUILD_PROTOBUF=OFF) and instead uses the protobuf Buildroot package
> (using the WITH_PROTOBUF=ON/OFF option).
>
> Is that correct ?
Yes, this is correct. I should have take more time in writing this
commit message.
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Best Regards,
Fabrice
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] package/opencv3: add protobuf option
2020-01-11 15:01 [Buildroot] [PATCH 1/1] package/opencv3: add protobuf option Fabrice Fontaine
2020-01-11 16:14 ` Thomas Petazzoni
@ 2020-01-12 21:45 ` Thomas Petazzoni
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2020-01-12 21:45 UTC (permalink / raw)
To: buildroot
On Sat, 11 Jan 2020 16:01:43 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Currently, protobuf is built unconditionnally since version 3.3.0 and
> https://github.com/opencv/opencv/commit/1c4c58d1b5b7430463281e8c8072e04245f561b0
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/opencv3/Config.in | 12 ++++++++++++
> package/opencv3/opencv3.mk | 8 ++++++++
> 2 files changed, 20 insertions(+)
I've applied after improving the commit title and commit log, as we
discussed.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-01-12 21:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-11 15:01 [Buildroot] [PATCH 1/1] package/opencv3: add protobuf option Fabrice Fontaine
2020-01-11 16:14 ` Thomas Petazzoni
2020-01-11 16:21 ` Fabrice Fontaine
2020-01-12 21:45 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox