From 9109bcf22c7f5f48afcf4234a4d4a596d6bd7bd2 Mon Sep 17 00:00:00 2001 From: Hirokazu Honda Date: Thu, 4 Feb 2021 01:27:30 +0000 Subject: subprojects: Add libyuv and built if -Dandroid=enabled Android HAL adaptation layer may need image processing, for example, scaling and format conversion. Libyuv is a general image processing. This adds libyuv to subprojects, so that it is forked locally and can be used with Android HAL implementation code. Signed-off-by: Hirokazu Honda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/android/meson.build | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src') diff --git a/src/android/meson.build b/src/android/meson.build index 3d4d3be4..7619517a 100644 --- a/src/android/meson.build +++ b/src/android/meson.build @@ -14,6 +14,23 @@ foreach dep : android_deps endif endforeach +if android_enabled + 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') + + android_deps += [ libyuv_dep, ] +endif + android_hal_sources = files([ 'camera3_hal.cpp', 'camera_hal_manager.cpp', -- cgit v1.2.1