| 1 |
libv4l2_sources = files( |
| 2 |
'libv4l2-priv.h', |
| 3 |
'libv4l2.c', |
| 4 |
'log.c', |
| 5 |
) |
| 6 |
|
| 7 |
libv4l2_api = files( |
| 8 |
'../include/libv4l-plugin.h', |
| 9 |
'../include/libv4l2.h', |
| 10 |
) |
| 11 |
|
| 12 |
install_headers(libv4l2_api) |
| 13 |
|
| 14 |
libv4l2_deps = [ |
| 15 |
dep_libdl, |
| 16 |
dep_libv4lconvert, |
| 17 |
dep_threads, |
| 18 |
] |
| 19 |
|
| 20 |
libv4l2_c_args = [] |
| 21 |
|
| 22 |
if get_option('v4l-plugins') |
| 23 |
libv4l2_sources += files('v4l2-plugin.c') |
| 24 |
libv4l2_c_args += [ |
| 25 |
'-DHAVE_V4L_PLUGINS', |
| 26 |
'-DLIBV4L2_PLUGIN_DIR="@0@"'.format(libv4l2plugindir) |
| 27 |
] |
| 28 |
endif |
| 29 |
|
| 30 |
if have_visibility |
| 31 |
libv4l2_c_args += ['-fvisibility=hidden'] |
| 32 |
endif |
| 33 |
|
| 34 |
libv4l2 = library('v4l2', |
| 35 |
libv4l2_sources, |
| 36 |
soversion: '0', |
| 37 |
version: '0.0.0', |
| 38 |
install : true, |
| 39 |
dependencies : libv4l2_deps, |
| 40 |
c_args : libv4l2_c_args, |
| 41 |
include_directories : v4l2_utils_incdir) |
| 42 |
|
| 43 |
dep_libv4l2 = declare_dependency(link_with : libv4l2) |
| 44 |
meson.override_dependency('libv4l2', dep_libv4l2) |
| 45 |
|
| 46 |
pkg.generate( |
| 47 |
libv4l2, |
| 48 |
name : 'libv4l2', |
| 49 |
version : meson.project_version(), |
| 50 |
requires_private : 'libv4lconvert', |
| 51 |
description : 'v4l2 device access library') |
| 52 |
|
| 53 |
if not get_option('v4l-wrappers') |
| 54 |
subdir_done() |
| 55 |
endif |
| 56 |
|
| 57 |
v4l2convert_sources = files( |
| 58 |
'v4l2convert.c', |
| 59 |
) |
| 60 |
|
| 61 |
v4l2convert_deps = [ |
| 62 |
dep_libv4l2, |
| 63 |
] |
| 64 |
|
| 65 |
libv4l2privdir = get_option('prefix') / get_option('libdir') / get_option('libv4l2subdir') |
| 66 |
|
| 67 |
v4l2convert = shared_module('v4l2convert', |
| 68 |
v4l2convert_sources, |
| 69 |
name_prefix : '', |
| 70 |
install : true, |
| 71 |
install_dir : libv4l2privdir, |
| 72 |
c_args : v4l2_wrapper_args, |
| 73 |
dependencies : v4l2convert_deps, |
| 74 |
include_directories : v4l2_utils_incdir) |