[raw2rgbpnm] Add support for the meson build system
diff mbox series

Message ID 20260915103106.3834481-1-laurent.pinchart@ideasonboard.com
State Not Applicable
Headers show
Series
  • [raw2rgbpnm] Add support for the meson build system
Related show

Commit Message

Laurent Pinchart Sept. 15, 2026, 10:31 a.m. UTC
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Meson is a modern build system with native support for
cross-compilation. Support it by adding a meson.build file, and ignore
the build/ directory that is the de facto standard for builds. Support
for make is preserved and can be removed later.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 .gitignore  |  1 +
 meson.build | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+)
 create mode 100644 meson.build


base-commit: c23c8fa65fcfdfbb6c3ebd63d101fe9844e3c19f

Comments

Laurent Pinchart Sept. 15, 2026, 10:36 a.m. UTC | #1
On Tue, Sep 15, 2026 at 01:31:06PM +0300, Laurent Pinchart wrote:
> From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> 
> Meson is a modern build system with native support for
> cross-compilation. Support it by adding a meson.build file, and ignore
> the build/ directory that is the de facto standard for builds. Support
> for make is preserved and can be removed later.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Sent by mistake to libcamera-devel. Sorry about the noise.

> ---
>  .gitignore  |  1 +
>  meson.build | 34 ++++++++++++++++++++++++++++++++++
>  2 files changed, 35 insertions(+)
>  create mode 100644 meson.build
> 
> diff --git a/.gitignore b/.gitignore
> index 8477d66355d9..9bb5e963abeb 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -1,2 +1,3 @@
> +build/
>  raw2rgbpnm
>  *.o
> diff --git a/meson.build b/meson.build
> new file mode 100644
> index 000000000000..4fba1229b691
> --- /dev/null
> +++ b/meson.build
> @@ -0,0 +1,34 @@
> +# SPDX-License-Identifier: CC0-1.0
> +
> +project('raw2rgbpnm', 'c',
> +    meson_version : '>= 0.40',
> +    version : '0.0.0',
> +    default_options : [
> +        'werror=true',
> +        'warning_level=2',
> +    ],
> +    license : 'GPL 2.0+')
> +
> +#
> +# Configure the build environment
> +#
> +cc = meson.get_compiler('c')
> +
> +cc_arguments = [
> +    '-Wno-missing-field-initializers',
> +]
> +
> +add_project_arguments(cc_arguments, language : 'c')
> +
> +#
> +# raw2rgbpnm
> +#
> +raw2rgbpnm_sources = files([
> +    'raw2rgbpnm.c',
> +    'raw_to_rgb.c',
> +    'utils.c',
> +])
> +
> +raw2rgbpnm = executable('raw2rgbpnm', raw2rgbpnm_sources,
> +                        include_directories : include_directories('include'),
> +                        install : true)
> 
> base-commit: c23c8fa65fcfdfbb6c3ebd63d101fe9844e3c19f

Patch
diff mbox series

diff --git a/.gitignore b/.gitignore
index 8477d66355d9..9bb5e963abeb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@ 
+build/
 raw2rgbpnm
 *.o
diff --git a/meson.build b/meson.build
new file mode 100644
index 000000000000..4fba1229b691
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,34 @@ 
+# SPDX-License-Identifier: CC0-1.0
+
+project('raw2rgbpnm', 'c',
+    meson_version : '>= 0.40',
+    version : '0.0.0',
+    default_options : [
+        'werror=true',
+        'warning_level=2',
+    ],
+    license : 'GPL 2.0+')
+
+#
+# Configure the build environment
+#
+cc = meson.get_compiler('c')
+
+cc_arguments = [
+    '-Wno-missing-field-initializers',
+]
+
+add_project_arguments(cc_arguments, language : 'c')
+
+#
+# raw2rgbpnm
+#
+raw2rgbpnm_sources = files([
+    'raw2rgbpnm.c',
+    'raw_to_rgb.c',
+    'utils.c',
+])
+
+raw2rgbpnm = executable('raw2rgbpnm', raw2rgbpnm_sources,
+                        include_directories : include_directories('include'),
+                        install : true)