blob: b872e213aa401e75cc9bb26a4ba6bf78ac48211d [file] [log] [blame]
Andrew Geissler8f840682023-07-21 09:09:43 -05001From c00a155e90a9b22bd6ab5fa5407bb9923ee16ca0 Mon Sep 17 00:00:00 2001
2From: "Meyer, Wolfgang" <Wolfgang.Meyer@gossenmetrawatt.com>
3Date: Fri, 16 Sep 2022 18:45:58 +0200
4Subject: [PATCH] meson.build: make fbpdf build optional
5
Andrew Geissler5082cc72023-09-11 08:41:39 -04006Upstream-Status: Submitted [https://github.com/kraxel/fbida/pull/4]
Andrew Geissler8f840682023-07-21 09:09:43 -05007Signed-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
13diff --git a/meson.build b/meson.build
14index 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' ]
55diff --git a/meson_options.txt b/meson_options.txt
56index 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--
652.37.3
66