diff options
Diffstat (limited to 'src/v4l2/meson.build')
-rw-r--r-- | src/v4l2/meson.build | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/v4l2/meson.build b/src/v4l2/meson.build index efab968f..2c040414 100644 --- a/src/v4l2/meson.build +++ b/src/v4l2/meson.build @@ -1,5 +1,14 @@ +# SPDX-License-Identifier: CC0-1.0 + +v4l2_enabled = get_option('v4l2').allowed() + +if not v4l2_enabled + subdir_done() +endif + v4l2_compat_sources = files([ 'v4l2_camera.cpp', + 'v4l2_camera_file.cpp', 'v4l2_camera_proxy.cpp', 'v4l2_compat.cpp', 'v4l2_compat_manager.cpp', @@ -13,6 +22,8 @@ v4l2_compat_cpp_args = [ # file operations, disable transparent large file support. '-U_FILE_OFFSET_BITS', '-D_FILE_OFFSET_BITS=32', + '-D_LARGEFILE64_SOURCE', + '-U_TIME_BITS', '-fvisibility=hidden', ] @@ -20,6 +31,18 @@ v4l2_compat = shared_library('v4l2-compat', v4l2_compat_sources, name_prefix : '', install : true, - include_directories : libcamera_internal_includes, - dependencies : [ libcamera_dep, libdl ], + install_dir : libcamera_libexecdir, + dependencies : [libcamera_private, libdl], cpp_args : v4l2_compat_cpp_args) + +# Provide a wrapper script to support easily loading applications with the V4L2 +# adaptation layer. + +cdata = configuration_data() +cdata.set('LIBCAMERA_V4L2_SO', get_option('prefix') / libcamera_libexecdir / 'v4l2-compat.so') + +configure_file(input : 'libcamerify.in', + output : 'libcamerify', + configuration : cdata, + install_dir : get_option('bindir'), + install_tag : 'bin') |