meson: Fix coding style in meson.build files
Consistently go for 4 spaces indentation, and always put a space between the colon in argument lists, as per the examples from the meson documentation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
1f32abb995
commit
41adc3f8d3
9 changed files with 57 additions and 57 deletions
|
@ -4,7 +4,7 @@ doc_install_dir = join_paths(get_option('datadir'), 'doc', 'libcamera-@0@'.forma
|
|||
# Doxygen
|
||||
#
|
||||
|
||||
doxygen = find_program('doxygen', required: false)
|
||||
doxygen = find_program('doxygen', required : false)
|
||||
|
||||
if doxygen.found()
|
||||
cdata = configuration_data()
|
||||
|
@ -12,30 +12,30 @@ if doxygen.found()
|
|||
cdata.set('TOP_SRCDIR', meson.source_root())
|
||||
cdata.set('TOP_BUILDDIR', meson.build_root())
|
||||
|
||||
doxyfile = configure_file(input: 'Doxyfile.in',
|
||||
output: 'Doxyfile',
|
||||
configuration: cdata)
|
||||
doxyfile = configure_file(input : 'Doxyfile.in',
|
||||
output : 'Doxyfile',
|
||||
configuration : cdata)
|
||||
|
||||
custom_target('doxygen',
|
||||
input: [
|
||||
input : [
|
||||
doxyfile,
|
||||
libcamera_api,
|
||||
libcamera_headers,
|
||||
libcamera_sources,
|
||||
],
|
||||
output: 'api-html',
|
||||
command: [doxygen, doxyfile],
|
||||
install: true,
|
||||
install_dir: doc_install_dir)
|
||||
output : 'api-html',
|
||||
command : [doxygen, doxyfile],
|
||||
install : true,
|
||||
install_dir : doc_install_dir)
|
||||
endif
|
||||
|
||||
#
|
||||
# Sphinx
|
||||
#
|
||||
|
||||
sphinx = find_program('sphinx-build-3', required: false)
|
||||
sphinx = find_program('sphinx-build-3', required : false)
|
||||
if not sphinx.found()
|
||||
sphinx = find_program('sphinx-build', required: false)
|
||||
sphinx = find_program('sphinx-build', required : false)
|
||||
endif
|
||||
|
||||
if sphinx.found()
|
||||
|
@ -48,10 +48,10 @@ if sphinx.found()
|
|||
]
|
||||
|
||||
custom_target('documentation',
|
||||
command: [sphinx, '-q', '-W', '-b', 'html', meson.current_source_dir(), '@OUTPUT@'],
|
||||
input: docs_sources,
|
||||
output: 'html',
|
||||
build_by_default: true,
|
||||
install: true,
|
||||
install_dir: doc_install_dir)
|
||||
command : [sphinx, '-q', '-W', '-b', 'html', meson.current_source_dir(), '@OUTPUT@'],
|
||||
input : docs_sources,
|
||||
output : 'html',
|
||||
build_by_default : true,
|
||||
install : true,
|
||||
install_dir : doc_install_dir)
|
||||
endif
|
||||
|
|
28
meson.build
28
meson.build
|
@ -1,12 +1,12 @@
|
|||
project('libcamera', 'c', 'cpp',
|
||||
meson_version: '>= 0.40',
|
||||
version : '0.1',
|
||||
default_options: [
|
||||
'werror=true',
|
||||
'warning_level=2',
|
||||
'cpp_std=c++11',
|
||||
],
|
||||
license : 'LGPL 2.1+')
|
||||
meson_version : '>= 0.40',
|
||||
version : '0.1',
|
||||
default_options : [
|
||||
'werror=true',
|
||||
'warning_level=2',
|
||||
'cpp_std=c++11',
|
||||
],
|
||||
license : 'LGPL 2.1+')
|
||||
|
||||
# TODO: Extract this from project.version.
|
||||
# Ideally the version at Documentation/conf.py should be
|
||||
|
@ -16,7 +16,7 @@ api_version = '0.1'
|
|||
cc = meson.get_compiler('c')
|
||||
config_h = configuration_data()
|
||||
|
||||
if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix: '#define _GNU_SOURCE')
|
||||
if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOURCE')
|
||||
config_h.set('HAVE_SECURE_GETENV', 1)
|
||||
endif
|
||||
|
||||
|
@ -28,8 +28,8 @@ common_arguments = [
|
|||
c_arguments = common_arguments
|
||||
cpp_arguments = common_arguments
|
||||
|
||||
add_project_arguments(c_arguments, language: 'c')
|
||||
add_project_arguments(cpp_arguments, language: 'cpp')
|
||||
add_project_arguments(c_arguments, language : 'c')
|
||||
add_project_arguments(cpp_arguments, language : 'cpp')
|
||||
|
||||
libcamera_includes = include_directories('include')
|
||||
|
||||
|
@ -41,14 +41,14 @@ subdir('utils')
|
|||
# through configuration values. They are enabled by default.
|
||||
|
||||
if get_option('documentation')
|
||||
subdir('Documentation')
|
||||
subdir('Documentation')
|
||||
endif
|
||||
|
||||
if get_option('tests')
|
||||
subdir('test')
|
||||
subdir('test')
|
||||
endif
|
||||
|
||||
configure_file(output: 'config.h', configuration: config_h)
|
||||
configure_file(output : 'config.h', configuration : config_h)
|
||||
|
||||
pkg_mod = import('pkgconfig')
|
||||
pkg_mod.generate(libraries : libcamera,
|
||||
|
|
|
@ -51,7 +51,7 @@ includes = [
|
|||
|
||||
subdir('pipeline')
|
||||
|
||||
libudev = dependency('libudev', required: false)
|
||||
libudev = dependency('libudev', required : false)
|
||||
|
||||
if libudev.found()
|
||||
config_h.set('HAVE_LIBUDEV', 1)
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
# Tests are listed in order of complexity.
|
||||
# They are not alphabetically sorted.
|
||||
camera_tests = [
|
||||
[ 'configuration_default', 'configuration_default.cpp' ],
|
||||
[ 'configuration_set', 'configuration_set.cpp' ],
|
||||
[ 'statemachine', 'statemachine.cpp' ],
|
||||
[ 'capture', 'capture.cpp' ],
|
||||
[ 'configuration_default', 'configuration_default.cpp' ],
|
||||
[ 'configuration_set', 'configuration_set.cpp' ],
|
||||
[ 'statemachine', 'statemachine.cpp' ],
|
||||
[ 'capture', 'capture.cpp' ],
|
||||
]
|
||||
|
||||
foreach t : camera_tests
|
||||
exe = executable(t[0], [t[1], 'camera_test.cpp'],
|
||||
link_with : test_libraries,
|
||||
include_directories : test_includes_internal)
|
||||
test(t[0], exe, suite: 'camera', is_parallel: false)
|
||||
exe = executable(t[0], [t[1], 'camera_test.cpp'],
|
||||
link_with : test_libraries,
|
||||
include_directories : test_includes_internal)
|
||||
test(t[0], exe, suite : 'camera', is_parallel : false)
|
||||
endforeach
|
||||
|
|
|
@ -4,8 +4,8 @@ ipa_modules_sources = [
|
|||
]
|
||||
|
||||
foreach m : ipa_modules_sources
|
||||
shared_library(m, name_prefix: '',
|
||||
include_directories: test_includes_public)
|
||||
shared_library(m, name_prefix : '',
|
||||
include_directories : test_includes_public)
|
||||
endforeach
|
||||
|
||||
ipa_test = [
|
||||
|
@ -17,5 +17,5 @@ foreach t : ipa_test
|
|||
link_with : test_libraries,
|
||||
include_directories : test_includes_internal)
|
||||
|
||||
test(t[0], exe, suite: 'ipa', is_parallel: false)
|
||||
test(t[0], exe, suite : 'ipa', is_parallel : false)
|
||||
endforeach
|
||||
|
|
|
@ -16,5 +16,5 @@ foreach t : media_device_tests
|
|||
link_with : [test_libraries, lib_mdev_test],
|
||||
include_directories : test_includes_internal)
|
||||
|
||||
test(t[0], exe, suite: 'media_device', is_parallel: false)
|
||||
test(t[0], exe, suite : 'media_device', is_parallel : false)
|
||||
endforeach
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
ipu3_test = [
|
||||
['ipu3_pipeline_test', 'ipu3_pipeline_test.cpp'],
|
||||
['ipu3_pipeline_test', 'ipu3_pipeline_test.cpp'],
|
||||
]
|
||||
|
||||
foreach t : ipu3_test
|
||||
|
@ -7,5 +7,5 @@ foreach t : ipu3_test
|
|||
link_with : test_libraries,
|
||||
include_directories : test_includes_internal)
|
||||
|
||||
test(t[0], exe, suite: 'ipu3', is_parallel: false)
|
||||
test(t[0], exe, suite : 'ipu3', is_parallel : false)
|
||||
endforeach
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
# Tests are listed in order of complexity.
|
||||
# They are not alphabetically sorted.
|
||||
v4l2_device_tests = [
|
||||
[ 'double_open', 'double_open.cpp' ],
|
||||
[ 'formats', 'formats.cpp' ],
|
||||
[ 'request_buffers', 'request_buffers.cpp' ],
|
||||
[ 'stream_on_off', 'stream_on_off.cpp' ],
|
||||
[ 'capture_async', 'capture_async.cpp' ],
|
||||
[ 'buffer_sharing', 'buffer_sharing.cpp' ],
|
||||
[ 'double_open', 'double_open.cpp' ],
|
||||
[ 'formats', 'formats.cpp' ],
|
||||
[ 'request_buffers', 'request_buffers.cpp' ],
|
||||
[ 'stream_on_off', 'stream_on_off.cpp' ],
|
||||
[ 'capture_async', 'capture_async.cpp' ],
|
||||
[ 'buffer_sharing', 'buffer_sharing.cpp' ],
|
||||
]
|
||||
|
||||
foreach t : v4l2_device_tests
|
||||
exe = executable(t[0], [t[1], 'v4l2_device_test.cpp'],
|
||||
link_with : test_libraries,
|
||||
include_directories : test_includes_internal)
|
||||
test(t[0], exe, suite: 'v4l2_device', is_parallel: false)
|
||||
exe = executable(t[0], [t[1], 'v4l2_device_test.cpp'],
|
||||
link_with : test_libraries,
|
||||
include_directories : test_includes_internal)
|
||||
test(t[0], exe, suite : 'v4l2_device', is_parallel : false)
|
||||
endforeach
|
||||
|
|
|
@ -7,5 +7,5 @@ foreach t : v4l2_subdevice_tests
|
|||
exe = executable(t[0], [t[1], 'v4l2_subdevice_test.cpp'],
|
||||
link_with : test_libraries,
|
||||
include_directories : test_includes_internal)
|
||||
test(t[0], exe, suite: 'v4l2_subdevice', is_parallel: false)
|
||||
test(t[0], exe, suite : 'v4l2_subdevice', is_parallel : false)
|
||||
endforeach
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue