Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 1 | From c00a155e90a9b22bd6ab5fa5407bb9923ee16ca0 Mon Sep 17 00:00:00 2001 |
| 2 | From: "Meyer, Wolfgang" <Wolfgang.Meyer@gossenmetrawatt.com> |
| 3 | Date: Fri, 16 Sep 2022 18:45:58 +0200 |
| 4 | Subject: [PATCH] meson.build: make fbpdf build optional |
| 5 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 6 | Upstream-Status: Submitted [https://github.com/kraxel/fbida/pull/4] |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 7 | Signed-off-by: "Meyer, Wolfgang" <Wolfgang.Meyer@gossenmetrawatt.com> |
| 8 | --- |
| 9 | meson.build | 22 ++++++++++++---------- |
| 10 | meson_options.txt | 1 + |
| 11 | 2 files changed, 13 insertions(+), 10 deletions(-) |
| 12 | |
| 13 | diff --git a/meson.build b/meson.build |
| 14 | index 6b3daf3..289d1ec 100644 |
| 15 | --- a/meson.build |
| 16 | +++ b/meson.build |
| 17 | @@ -15,11 +15,11 @@ x11resdir = x11resrun.stdout().strip() |
| 18 | |
| 19 | # pkg-config deps |
| 20 | pixman_dep = dependency('pixman-1') |
| 21 | -poppler_dep = dependency('poppler-glib') |
| 22 | +poppler_dep = dependency('poppler-glib', required: get_option('pdf')) |
| 23 | cairo_dep = dependency('cairo') |
| 24 | drm_dep = dependency('libdrm') |
| 25 | -gbm_dep = dependency('gbm') |
| 26 | -epoxy_dep = dependency('epoxy') |
| 27 | +gbm_dep = dependency('gbm', required: get_option('pdf')) |
| 28 | +epoxy_dep = dependency('epoxy', required: get_option('pdf')) |
| 29 | exif_dep = dependency('libexif') |
| 30 | png_dep = dependency('libpng', required: get_option('png')) |
| 31 | tiff_dep = dependency('libtiff-4', required: get_option('tiff')) |
| 32 | @@ -132,13 +132,15 @@ fbpdf_deps = [ drm_dep, gbm_dep, epoxy_dep, |
| 33 | pixman_dep, poppler_dep, cairo_dep, |
| 34 | udev_dep, input_dep ] |
| 35 | |
| 36 | -executable('fbpdf', |
| 37 | - sources : fbpdf_srcs, |
| 38 | - dependencies : fbpdf_deps, |
| 39 | - install : true) |
| 40 | -install_data('fbgs', |
| 41 | - install_dir : get_option('bindir'), |
| 42 | - install_mode : 'rwxr--r--') |
| 43 | +if get_option('pdf').enabled() |
| 44 | + executable('fbpdf', |
| 45 | + sources : fbpdf_srcs, |
| 46 | + dependencies : fbpdf_deps, |
| 47 | + install : true) |
| 48 | + install_data('fbgs', |
| 49 | + install_dir : get_option('bindir'), |
| 50 | + install_mode : 'rwxr--r--') |
| 51 | +endif |
| 52 | |
| 53 | # build fbcon |
| 54 | fbcon_srcs = [ 'fbcon.c', 'drmtools.c', 'fbtools.c', 'gfx.c', 'vt.c', 'kbd.c' ] |
| 55 | diff --git a/meson_options.txt b/meson_options.txt |
| 56 | index ce37188..74699ab 100644 |
| 57 | --- a/meson_options.txt |
| 58 | +++ b/meson_options.txt |
| 59 | @@ -3,3 +3,4 @@ option('png', type: 'feature', value : 'enabled') |
| 60 | option('tiff', type: 'feature', value : 'enabled') |
| 61 | option('webp', type: 'feature', value : 'disabled') |
| 62 | option('motif', type: 'feature', value : 'disabled') |
| 63 | +option('pdf', type: 'feature', value : 'enabled') |
| 64 | -- |
| 65 | 2.37.3 |
| 66 | |