Files
external_libcamera/src/qcam/meson.build
T
Laurent Pinchart 02b129dab5 qcam: Make log less verbose by default
The qcam log prints one message per frame, which is pretty verbose. This
feature is useful for debugging, but not necessarily as a default
option. Silence it by default, and add a -v/--verbose command line
parameter to make the log verbose.

While this could have been handled manually by checking a verbose flag
when printing the message, the feature is instead integrated with the Qt
log infrastructure to make it more flexible. Messages printed by
qDebug() are now silenced by default and controlled by the -v/--verbose
argument.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-12-01 15:16:17 +02:00

77 lines
2.2 KiB
Meson

# SPDX-License-Identifier: CC0-1.0
qcam_sources = files([
'../cam/options.cpp',
'../cam/stream_options.cpp',
'format_converter.cpp',
'main.cpp',
'main_window.cpp',
'message_handler.cpp',
'viewfinder_qt.cpp',
])
qcam_moc_headers = files([
'main_window.h',
'viewfinder_qt.h',
])
qcam_resources = files([
'assets/feathericons/feathericons.qrc',
])
qt5 = import('qt5')
qt5_dep = dependency('qt5',
method : 'pkg-config',
modules : ['Core', 'Gui', 'Widgets'],
required : get_option('qcam'),
version : '>=5.4')
if qt5_dep.found()
qcam_deps = [
libcamera_dep,
qt5_dep,
]
qt5_cpp_args = [ '-DQT_NO_KEYWORDS' ]
tiff_dep = dependency('libtiff-4', required : false)
if tiff_dep.found()
qt5_cpp_args += [ '-DHAVE_TIFF' ]
qcam_deps += [ tiff_dep ]
qcam_sources += files([
'dng_writer.cpp',
])
endif
if cxx.has_header_symbol('QOpenGLWidget', 'QOpenGLWidget',
dependencies : qt5_dep, args : '-fPIC')
qcam_sources += files([
'viewfinder_gl.cpp',
])
qcam_moc_headers += files([
'viewfinder_gl.h',
])
qcam_resources += files([
'assets/shader/shaders.qrc'
])
endif
# gcc 9 introduced a deprecated-copy warning that is triggered by Qt until
# Qt 5.13. clang 10 introduced the same warning, but detects more issues
# that are not fixed in Qt yet. Disable the warning manually in both cases.
if ((cc.get_id() == 'gcc' and cc.version().version_compare('>=9.0') and
qt5_dep.version().version_compare('<5.13')) or
(cc.get_id() == 'clang' and cc.version().version_compare('>=10.0')))
qt5_cpp_args += [ '-Wno-deprecated-copy' ]
endif
resources = qt5.preprocess(moc_headers: qcam_moc_headers,
qresources : qcam_resources,
dependencies: qt5_dep)
qcam = executable('qcam', qcam_sources, resources,
install : true,
dependencies : qcam_deps,
cpp_args : qt5_cpp_args)
endif