summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/android/cros/camera3_hal.cpp21
-rw-r--r--src/android/cros/meson.build17
-rw-r--r--src/android/meson.build2
-rw-r--r--src/libcamera/meson.build1
-rw-r--r--src/meson.build2
5 files changed, 43 insertions, 0 deletions
diff --git a/src/android/cros/camera3_hal.cpp b/src/android/cros/camera3_hal.cpp
new file mode 100644
index 00000000..31ad36ac
--- /dev/null
+++ b/src/android/cros/camera3_hal.cpp
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2021, Google Inc.
+ *
+ * camera3_hal.cpp - cros-specific components of Android Camera HALv3 module
+ */
+
+#include <cros-camera/cros_camera_hal.h>
+
+static void set_up(cros::CameraMojoChannelManagerToken *token)
+{
+}
+
+static void tear_down()
+{
+}
+
+cros::cros_camera_hal_t CROS_CAMERA_EXPORT CROS_CAMERA_HAL_INFO_SYM = {
+ .set_up = set_up,
+ .tear_down = tear_down
+};
diff --git a/src/android/cros/meson.build b/src/android/cros/meson.build
new file mode 100644
index 00000000..4aab0f20
--- /dev/null
+++ b/src/android/cros/meson.build
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: CC0-1.0
+
+if get_option('android_platform') != 'cros'
+ subdir_done()
+endif
+
+cros_hal_info_sources = files([
+ 'camera3_hal.cpp',
+])
+
+cros_hal_info = static_library('cros_hal_info',
+ cros_hal_info_sources,
+ dependencies : dependency('libcros_camera'),
+ c_args : '-Wno-shadow',
+ include_directories : android_includes)
+
+libcamera_objects += cros_hal_info.extract_objects('camera3_hal.cpp')
diff --git a/src/android/meson.build b/src/android/meson.build
index 7004d32d..87d162c3 100644
--- a/src/android/meson.build
+++ b/src/android/meson.build
@@ -37,6 +37,8 @@ if android_enabled
android_deps += [libyuv_dep]
endif
+subdir('cros')
+
android_hal_sources = files([
'camera3_hal.cpp',
'camera_hal_manager.cpp',
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index 4b5e33ce..815629db 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -149,6 +149,7 @@ libcamera = shared_library('camera',
install : true,
link_with : libcamera_link_with,
include_directories : includes,
+ objects : libcamera_objects,
build_rpath : '/',
dependencies : libcamera_deps)
diff --git a/src/meson.build b/src/meson.build
index 0b26ca70..c908b067 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -11,6 +11,8 @@ else
ipa_sign_module = false
endif
+libcamera_objects = []
+
# The 'android' subdir must be processed first, and the build targets
# are included directly into the libcamera library when this is enabled.
subdir('android')