diff mbox series

[v4l-utils,v1,11/11] qvidcap: fix qmake project file

Message ID 20230415201056.31080-11-ps.report@gmx.net
State New
Headers show
Series [v4l-utils,v1,01/11] qv4l2: remove leagcy alsa_stream.h include (ENABLE_ALSA protected) | expand

Commit Message

Peter Seiderer April 15, 2023, 8:10 p.m. UTC
- add MESON_BUILD_PATH variable (and customize hint)
- add '-include' for config.h file (as the meson build does)
- add v4l2-convert.pl call to generate v4l2-convert.h
- add missing common/codec-v4l2-fwht.c and common/v4l2-info.cpp dependency
- adjust local library file paths

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 utils/qvidcap/qvidcap.pro | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/utils/qvidcap/qvidcap.pro b/utils/qvidcap/qvidcap.pro
index e9eaf7c2..db948611 100644
--- a/utils/qvidcap/qvidcap.pro
+++ b/utils/qvidcap/qvidcap.pro
@@ -8,29 +8,41 @@  CONFIG += debug
 
 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 
+# adjust to your local meson build path
+MESON_BUILD_PATH = $$PWD/build-meson
+
 # opengl: to disable opengl suppport comment out the following
 # line and the line '#define HAVE_QTGL 1' from ../../config.h
 QT += opengl
 
+QMAKE_CFLAGS += -include $$MESON_BUILD_PATH/config.h
+QMAKE_CXXFLAGS += -include $$MESON_BUILD_PATH/config.h
+
 INCLUDEPATH += $$PWD/../..
 INCLUDEPATH += $$PWD/../common
 INCLUDEPATH += $$PWD/../v4l2-compliance
 
+v4l2_convert_hook.depends = $$PWD/v4l2-convert.pl $$PWD/v4l2-convert.glsl
+v4l2_convert_hook.commands = perl $$PWD/v4l2-convert.pl < $$PWD/v4l2-convert.glsl > v4l2-convert.h
+QMAKE_EXTRA_TARGETS += v4l2_convert_hook
+
 # Input
 HEADERS += capture.h
 HEADERS += qvidcap.h
-HEADERS += ../../config.h
+HEADERS += $$MESON_BUILD_PATH/config.h
 
 SOURCES += capture.cpp paint.cpp
 SOURCES += qvidcap.cpp
 SOURCES += ../common/v4l-stream.c
 SOURCES += ../common/codec-fwht.c
+SOURCES += ../common/codec-v4l2-fwht.c
+SOURCES += ../common/v4l2-info.cpp
 SOURCES += ../common/v4l2-tpg-core.c
 SOURCES += ../common/v4l2-tpg-colors.c
 
-LIBS += -L$$PWD/../../lib/libv4l2/.libs -lv4l2
-LIBS += -L$$PWD/../../lib/libv4lconvert/.libs -lv4lconvert
-LIBS += -L$$PWD/../libv4l2util/.libs -lv4l2util
+LIBS += -L$$MESON_BUILD_PATH/lib/libv4l2 -lv4l2
+LIBS += -L$$MESON_BUILD_PATH/lib/libv4lconvert -lv4lconvert
+LIBS += -L$$MESON_BUILD_PATH/utils/libv4l2util -lv4l2util
 LIBS += -lrt -ldl -ljpeg
 
 RESOURCES += qvidcap.qrc