diff --git a/examples/meson.build b/examples/meson.build new file mode 100644 index 0000000..7e8980c --- /dev/null +++ b/examples/meson.build @@ -0,0 +1,29 @@ +libpng = dependency('libpng', required: false) + +executable( + 'draw', + [ + 'draw.c', + ], + dependencies: [ + neatvnc_dep, + pixman, + libuv, + ] +) + +if libpng.found() + executable( + 'png-server', + [ + 'png-server.c', + '../src/pngfb.c', + ], + dependencies: [ + neatvnc_dep, + pixman, + libuv, + libpng, + ] + ) +endif diff --git a/meson.build b/meson.build index acd374f..1c2f7da 100644 --- a/meson.build +++ b/meson.build @@ -91,6 +91,10 @@ neatvnc_dep = declare_dependency( link_with: neatvnc, ) +if get_option('examples') + subdir('examples') +endif + install_headers('include/neatvnc.h') pkgconfig = import('pkgconfig') diff --git a/meson_options.txt b/meson_options.txt index f161b12..22bc33a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,2 +1,3 @@ option('tight-encoding', type: 'feature', value: 'disabled', description: 'Enable Tight encoding (experimental)') option('tls', type: 'feature', value: 'auto', description: 'Enable encryption & authentication') +option('examples', type: 'boolean', value: false, description: 'Build examples')