summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattijs Korpershoek <mkorpershoek@baylibre.com>2023-10-13 17:32:28 +0200
committerMattijs Korpershoek <mkorpershoek@baylibre.com>2023-10-13 17:32:28 +0200
commite83bf7a15d35a677df64b781e2ff621aa9e72275 (patch)
treee83ede301b156c4fb25ad3055149336ac6e95ded
parente9195424a3522a60b60c737f5d88499d3f47450e (diff)
WIP: add vndk_libyuv for compile testing
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-rw-r--r--src/android/meson.build7
-rw-r--r--subprojects/packagefiles/vndk/meson.build6
-rw-r--r--subprojects/vndk.wrap2
3 files changed, 9 insertions, 6 deletions
diff --git a/src/android/meson.build b/src/android/meson.build
index 68646120..1e08e3b8 100644
--- a/src/android/meson.build
+++ b/src/android/meson.build
@@ -17,9 +17,14 @@ endforeach
libyuv_dep = dependency('libyuv', required : false)
+if not libyuv_dep.found()
+ libyuv_vndk_dep = dependency('vndk_libyuv', required : false)
+ android_deps += [libyuv_vndk_dep]
+endif
+
# Fallback to a subproject if libyuv isn't found, as it's typically not
# provided by distributions.
-if not libyuv_dep.found()
+if not libyuv_dep.found() and not libyuv_vndk_dep.found()
cmake = import('cmake')
libyuv_vars = cmake.subproject_options()
diff --git a/subprojects/packagefiles/vndk/meson.build b/subprojects/packagefiles/vndk/meson.build
index 40428ba4..b2430654 100644
--- a/subprojects/packagefiles/vndk/meson.build
+++ b/subprojects/packagefiles/vndk/meson.build
@@ -54,8 +54,6 @@ vndk_libcpp_dep = declare_dependency(
])
meson.override_dependency('cpp_stdlib', vndk_libcpp_dep)
-# TODO: add libexif, libjpeg and libyuv
-
libexif_dep = declare_dependency(
dependencies : [
cxx.find_library('exif', dirs : prebuild_libraries),
@@ -72,10 +70,10 @@ libjpeg_dep = declare_dependency(
include_directories : include_directories(include_base / 'external/libjpeg-turbo/'))
meson.override_dependency('libjpeg', libjpeg_dep)
-libyuv_dep = declare_dependency(
+vndk_libyuv_dep = declare_dependency(
dependencies : [
cxx.find_library('yuv', dirs : prebuild_libraries),
libutils_dep,
],
include_directories : include_directories(include_base / 'external/libyuv/files/include'))
-meson.override_dependency('libyuv', libyuv_dep)
+meson.override_dependency('vndk_libyuv', vndk_libyuv_dep)
diff --git a/subprojects/vndk.wrap b/subprojects/vndk.wrap
index 3393de1d..a0a70bec 100644
--- a/subprojects/vndk.wrap
+++ b/subprojects/vndk.wrap
@@ -9,4 +9,4 @@ depth = 1
patch_directory = vndk
[provide]
-dependency_names = libhardware, libui, vndk_libcpp, libexif, libjpeg, libyuv
+dependency_names = libhardware, libui, vndk_libcpp, libexif, libjpeg, vndk_libyuv