meson: Don't unnecessarily fallback to libyuv wrap
Before commiteeaa7de21b
("libcamera: pipeline: Add test pattern for VirtualPipelineHandler") the libyuv dependency was only needed for the Android adaptation layer. As libyuv isn't packaged by most distribution, meson fell back to using a meson wrap if the Android adaptation layer was enabled and the library wasn't found. With commiteeaa7de21b
, libyuv is also used by the virtual pipeline handler, and the meson wrap fallback handling got centralized and became unconditional, so the wrap is downloaded even if the components depending on libyuv are all disabled. This causes unnecessary downloads at setup time, which can be problematic on build systems without an internet connection. Fix this by making the wrap fallback conditional on the components that use libyuv. Fixes:eeaa7de21b
("libcamera: pipeline: Add test pattern for VirtualPipelineHandler") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Harvey Yang <chenghaoyang@chromium.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
ea7f6faefe
commit
e5f8d40bad
2 changed files with 6 additions and 5 deletions
|
@ -4,6 +4,7 @@ android_deps = [
|
||||||
dependency('libexif', required : get_option('android')),
|
dependency('libexif', required : get_option('android')),
|
||||||
dependency('libjpeg', required : get_option('android')),
|
dependency('libjpeg', required : get_option('android')),
|
||||||
libcamera_private,
|
libcamera_private,
|
||||||
|
libyuv_dep,
|
||||||
]
|
]
|
||||||
|
|
||||||
android_enabled = true
|
android_enabled = true
|
||||||
|
@ -15,8 +16,6 @@ foreach dep : android_deps
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
android_deps += [libyuv_dep]
|
|
||||||
|
|
||||||
android_hal_sources = files([
|
android_hal_sources = files([
|
||||||
'camera3_hal.cpp',
|
'camera3_hal.cpp',
|
||||||
'camera_capabilities.cpp',
|
'camera_capabilities.cpp',
|
||||||
|
|
|
@ -27,11 +27,13 @@ else
|
||||||
ipa_sign_module = false
|
ipa_sign_module = false
|
||||||
endif
|
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)
|
libyuv_dep = dependency('libyuv', required : false)
|
||||||
|
|
||||||
# Fallback to a subproject if libyuv isn't found, as it's typically not
|
if (pipelines.contains('virtual') or get_option('android').allowed()) and \
|
||||||
# provided by distributions.
|
not libyuv_dep.found()
|
||||||
if not libyuv_dep.found()
|
|
||||||
cmake = import('cmake')
|
cmake = import('cmake')
|
||||||
|
|
||||||
libyuv_vars = cmake.subproject_options()
|
libyuv_vars = cmake.subproject_options()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue