diff options
Diffstat (limited to 'src/meson.build')
-rw-r--r-- | src/meson.build | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/meson.build b/src/meson.build index 165a77bb..76198e95 100644 --- a/src/meson.build +++ b/src/meson.build @@ -27,6 +27,27 @@ else ipa_sign_module = false endif +# libyuv, used by the Android adaptation layer and the virtual pipeline handler. +# Fallback to a subproject if libyuv isn't found, as it's typically not provided +# by distributions. +libyuv_dep = dependency('libyuv', required : false) + +if (pipelines.contains('virtual') or get_option('android').allowed()) and \ + not libyuv_dep.found() + cmake = import('cmake') + + libyuv_vars = cmake.subproject_options() + libyuv_vars.add_cmake_defines({'CMAKE_POSITION_INDEPENDENT_CODE': 'ON'}) + libyuv_vars.set_override_option('cpp_std', 'c++17') + libyuv_vars.append_compile_args('cpp', + '-Wno-sign-compare', + '-Wno-unused-variable', + '-Wno-unused-parameter') + libyuv_vars.append_link_args('-ljpeg') + libyuv = cmake.subproject('libyuv', options : libyuv_vars) + libyuv_dep = libyuv.dependency('yuv') +endif + # libcamera must be built first as a dependency to the other components. subdir('libcamera') |