From fe751929ccc8fd75e350ed6db9d28d04bd31fc79 Mon Sep 17 00:00:00 2001
From: Daniel Gomez <dagmcr@gmail.com>
Date: Sun, 17 Jan 2021 23:33:19 +0100
Subject: [PATCH 2/2] zbarcam: Create subdir in Makefile

Create builddir/zbarcam when --with-qt5 is enabled.

Fixes the following error:

moc -i -Izbarcam -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_GUI_LIB
-DQT_CORE_LIB
-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtWidgets
-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtX11Extras
-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtGui
-I/var/lib/yocto/gallium/tmp_20210113/work/znver1-poky-linux/zbar/0.23.1+gitAUTOINC+89e7900d85-r0/recipe-sysroot/usr/include/QtCore
-I../git/include ../git/zbarcam/zbarcam-qt.cpp -o
zbarcam/moc_zbarcam_qt.h
moc: Cannot create zbarcam/moc_zbarcam_qt.h
make: *** [Makefile:2438: zbarcam/moc_zbarcam_qt.h] Error 1

Signed-off-by: Daniel Gomez <dagmcr@gmail.com>
---
Upstream-Status: Pending

 zbarcam/Makefile.am.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/zbarcam/Makefile.am.inc b/zbarcam/Makefile.am.inc
index b6de82c..e90c50c 100644
--- a/zbarcam/Makefile.am.inc
+++ b/zbarcam/Makefile.am.inc
@@ -28,6 +28,7 @@ DISTCLEANFILES += $(nodist_zbarcam_zbarcam_qt_SOURCES) zbarcam/moc_zbarcam_qt.h
 
 
 zbarcam/moc_zbarcam_qt.h: zbarcam/zbarcam-qt.cpp
+	@$(mkdir_p) zbarcam 2>/dev/null
 	$(MOC) -i $(zbarcam_zbarcam_qt_CPPFLAGS) $< -o $@
 endif
 
-- 
2.29.2

