diff options
author | L. E. Segovia <amy@amyspark.me> | 2022-12-03 11:10:47 -0300 |
---|---|---|
committer | L. E. Segovia <amy@amyspark.me> | 2022-12-06 17:53:16 +0000 |
commit | 92ab46a123adba6413d53d88e2823a64342a6ff9 (patch) | |
tree | 6d30c8d1a194de663430277a8274fdf67eb62e23 | |
parent | 1d38cfdc0acf2799ed74a47c42f4b23343ee9be9 (diff) | |
download | lcms2-92ab46a123adba6413d53d88e2823a64342a6ff9.tar.gz |
meson: Support building the samples
-rw-r--r-- | meson.build | 4 | ||||
-rw-r--r-- | meson_options.txt | 1 | ||||
-rw-r--r-- | utils/samples/meson.build | 33 |
3 files changed, 38 insertions, 0 deletions
diff --git a/meson.build b/meson.build index c9cd356..a1d4bc3 100644 --- a/meson.build +++ b/meson.build @@ -86,5 +86,9 @@ subdir('src') subdir('testbed') subdir('utils') +if get_option('samples') + subdir('utils/samples') +endif + pkg = import('pkgconfig') pkg.generate(liblcms2_lib) diff --git a/meson_options.txt b/meson_options.txt index 7f0ee41..3faa00c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ option('jpeg', type: 'feature', value: 'auto', description: 'Use JPEG') option('tiff', type: 'feature', value: 'auto', description: 'Use LibTiff') +option('samples', type: 'boolean', value: 'false', description: 'Build the samples') diff --git a/utils/samples/meson.build b/utils/samples/meson.build new file mode 100644 index 0000000..17ab13f --- /dev/null +++ b/utils/samples/meson.build @@ -0,0 +1,33 @@ +wtpt_srcs = files( + 'wtpt.c', +) + +wtpt_exe = executable( + 'wtpt', + wtpt_srcs, + dependencies: [liblcms2_dep, common_dep], +) + +wtpt_man = files( + 'wtpt.1', +) + +# install_man(wtpt_man) + +examples = { + 'roundtrip': files('roundtrip.c'), + 'mktiff8': files('mktiff8.c'), + # 'vericc': files('vericc.c'), + # The following are commented out because they're LCMS 1 + # 'mkgrayer': files('mkgrayer.c'), + # 'mkcmy': files('mkcmy.c'), + # 'itufax': files('itufax.c'), +} + +foreach exe, srcs : examples + executable( + exe, + srcs, + dependencies: [liblcms2_dep], + ) +endforeach |