summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-26 19:04:33 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-29 12:42:15 +0300
commitc8c1d07cea2d8ef63905bf4f0b5266a5e6fd749f (patch)
treebca4499b7e8a5deeaeb6315f52bb9adb9f5b46e6
parentff6c50974a2059649f4c96a96d41a50d7eb7a780 (diff)
libcamera: Simplify header install paths with shortcut variables
Create local install_dir meson variable to store the full path to the installation directory for the libcamera and ipa headers. This shortens lines and avoids duplicating calls to get_option('includedir'). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--include/libcamera/ipa/meson.build6
-rw-r--r--include/libcamera/meson.build10
2 files changed, 10 insertions, 6 deletions
diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build
index 81fb69f0..6ea94fb5 100644
--- a/include/libcamera/ipa/meson.build
+++ b/include/libcamera/ipa/meson.build
@@ -13,6 +13,8 @@ install_headers(libcamera_ipa_headers,
libcamera_generated_ipa_headers = []
+ipa_headers_install_dir = get_option('includedir') / libcamera_ipa_include_dir
+
#
# Prepare IPA/IPC generation components
#
@@ -34,7 +36,7 @@ libcamera_generated_ipa_headers += custom_target('core_ipa_interface_h',
output : 'core_ipa_interface.h',
depends : mojom_templates,
install : true,
- install_dir : get_option('includedir') / libcamera_ipa_include_dir,
+ install_dir : ipa_headers_install_dir,
command : [
mojom_generator, 'generate',
'-g', 'libcamera',
@@ -98,7 +100,7 @@ foreach file : ipa_mojom_files
output : name + '_ipa_interface.h',
depends : mojom_templates,
install : true,
- install_dir : get_option('includedir') / libcamera_ipa_include_dir,
+ install_dir : ipa_headers_install_dir,
command : [
mojom_generator, 'generate',
'-g', 'libcamera',
diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
index 567782a6..7155ff20 100644
--- a/include/libcamera/meson.build
+++ b/include/libcamera/meson.build
@@ -29,6 +29,8 @@ install_headers(libcamera_public_headers,
# Generate headers from templates.
#
+libcamera_headers_install_dir = get_option('includedir') / libcamera_include_dir
+
# control_ids.h and property_ids.h
control_source_files = [
'control_ids',
@@ -44,7 +46,7 @@ foreach header : control_source_files
output : header + '.h',
command : [gen_controls, '-o', '@OUTPUT@', '@INPUT@'],
install : true,
- install_dir : get_option('includedir') / libcamera_include_dir)
+ install_dir : libcamera_headers_install_dir)
endforeach
libcamera_public_headers += control_headers
@@ -59,7 +61,7 @@ formats_h = custom_target('formats_h',
output : 'formats.h',
command : [gen_formats, '-o', '@OUTPUT@', '@INPUT@'],
install : true,
- install_dir : get_option('includedir') / libcamera_include_dir)
+ install_dir : libcamera_headers_install_dir)
libcamera_public_headers += formats_h
# libcamera.h
@@ -68,7 +70,7 @@ libcamera_h = custom_target('gen-header',
output : 'libcamera.h',
command : [gen_header, meson.current_source_dir(), '@OUTPUT@'],
install : true,
- install_dir : get_option('includedir') / libcamera_include_dir)
+ install_dir : libcamera_headers_install_dir)
libcamera_public_headers += libcamera_h
@@ -82,4 +84,4 @@ libcamera_version_config.set('LIBCAMERA_VERSION_PATCH', version[2])
configure_file(input : 'version.h.in',
output : 'version.h',
configuration : libcamera_version_config,
- install_dir : get_option('includedir') / libcamera_include_dir)
+ install_dir : libcamera_headers_install_dir)