summaryrefslogtreecommitdiff
path: root/src/libcamera/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/meson.build')
-rw-r--r--src/libcamera/meson.build72
1 files changed, 59 insertions, 13 deletions
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index b57bee7e..a3b12bc1 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -7,15 +7,15 @@ libcamera_sources = files([
'camera_controls.cpp',
'camera_lens.cpp',
'camera_manager.cpp',
- 'camera_sensor.cpp',
- 'camera_sensor_properties.cpp',
'color_space.cpp',
'controls.cpp',
'control_serializer.cpp',
'control_validator.cpp',
+ 'converter.cpp',
'delayed_controls.cpp',
'device_enumerator.cpp',
'device_enumerator_sysfs.cpp',
+ 'dma_heaps.cpp',
'fence.cpp',
'formats.cpp',
'framebuffer.cpp',
@@ -33,11 +33,13 @@ libcamera_sources = files([
'mapped_framebuffer.cpp',
'media_device.cpp',
'media_object.cpp',
+ 'orientation.cpp',
'pipeline_handler.cpp',
'pixel_format.cpp',
'process.cpp',
'pub_key.cpp',
'request.cpp',
+ 'shared_mem_object.cpp',
'source_paths.cpp',
'stream.cpp',
'sysfs.cpp',
@@ -57,20 +59,46 @@ includes = [
libcamera_includes,
]
+libcamera_deps = []
+
libatomic = cc.find_library('atomic', required : false)
+libthreads = dependency('threads')
subdir('base')
+subdir('converter')
subdir('ipa')
subdir('pipeline')
subdir('proxy')
+subdir('sensor')
+subdir('software_isp')
+
+null_dep = dependency('', required : false)
-libdl = cc.find_library('dl')
-libgnutls = cc.find_library('gnutls', required : true)
-libudev = dependency('libudev', required : false)
+# TODO: Use dependency('dl') when updating to meson 0.62.0 or newer.
+libdl = null_dep
+if not cc.has_function('dlopen')
+ libdl = cc.find_library('dl')
+endif
+libudev = dependency('libudev', required : get_option('udev'))
libyaml = dependency('yaml-0.1', required : false)
-if libgnutls.found()
+# Use one of gnutls or libcrypto (provided by OpenSSL), trying gnutls first.
+libcrypto = dependency('gnutls', required : false)
+if libcrypto.found()
config_h.set('HAVE_GNUTLS', 1)
+else
+ libcrypto = dependency('libcrypto', required : false)
+ if libcrypto.found()
+ config_h.set('HAVE_CRYPTO', 1)
+ endif
+endif
+
+if not libcrypto.found()
+ warning('Neither gnutls nor libcrypto found, all IPA modules will be isolated')
+ summary({'IPA modules signed with': 'None (modules will run isolated)'},
+ section : 'Configuration')
+else
+ summary({'IPA modules signed with' : libcrypto.name()}, section : 'Configuration')
endif
if liblttng.found()
@@ -101,12 +129,27 @@ endif
control_sources = []
-foreach source : control_source_files
- input_files = files(source +'.yaml', source + '.cpp.in')
- control_sources += custom_target(source + '_cpp',
+controls_mode_files = {
+ 'controls' : controls_files,
+ 'properties' : properties_files,
+}
+
+foreach mode, input_files : controls_mode_files
+ input_files = files(input_files)
+
+ if mode == 'controls'
+ template_file = files('control_ids.cpp.in')
+ else
+ template_file = files('property_ids.cpp.in')
+ endif
+
+ ranges_file = files('control_ranges.yaml')
+ control_sources += custom_target(mode + '_cpp',
input : input_files,
- output : source + '.cpp',
- command : [gen_controls, '-o', '@OUTPUT@', '@INPUT@'])
+ output : mode + '_ids.cpp',
+ command : [gen_controls, '-o', '@OUTPUT@',
+ '--mode', mode, '-t', template_file,
+ '-r', ranges_file, '@INPUT@'])
endforeach
libcamera_sources += control_sources
@@ -131,12 +174,12 @@ if ipa_sign_module
libcamera_sources += ipa_pub_key_cpp
endif
-libcamera_deps = [
+libcamera_deps += [
libatomic,
libcamera_base,
libcamera_base_private,
+ libcrypto,
libdl,
- libgnutls,
liblttng,
libudev,
libyaml,
@@ -150,6 +193,7 @@ libcamera_deps = [
libcamera = shared_library('libcamera',
libcamera_sources,
version : libcamera_version,
+ soversion : libcamera_soversion,
name_prefix : '',
install : true,
include_directories : includes,
@@ -179,4 +223,6 @@ pkg_mod.generate(libcamera,
description : 'Complex Camera Support Library',
subdirs : 'libcamera')
+meson.override_dependency('libcamera', libcamera_public)
+
subdir('proxy/worker')