diff options
author | Niels De Graef <nielsdegraef@gmail.com> | 2019-05-08 08:27:38 +0200 |
---|---|---|
committer | Günther Wagner <info@gunibert.de> | 2021-10-21 12:52:27 +0200 |
commit | afcf2ed34ca0b47aaee6f81625d4deec2c3d6bb9 (patch) | |
tree | 43bad38eb62e220408b4cc053c54ced78db8ae28 /rest-extras | |
parent | 409dec8b596bb6cc3b8e25d0572bf5cd38130968 (diff) | |
download | librest-afcf2ed34ca0b47aaee6f81625d4deec2c3d6bb9.tar.gz |
Port to the Meson build system
See the [Meson website] for a full reference. To build, test and/or
install the librest library, you essentially need the following commands:
```
$ meson build
$ ninja -C build
$ meson test -C build
$ ninja -C build install
```
For the GNOME initiative, see
https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting
[Meson website]: http://mesonbuild.com/
https://gitlab.gnome.org/GNOME/librest/merge_requests/1
Diffstat (limited to 'rest-extras')
-rw-r--r-- | rest-extras/meson.build | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/rest-extras/meson.build b/rest-extras/meson.build new file mode 100644 index 0000000..b85b388 --- /dev/null +++ b/rest-extras/meson.build @@ -0,0 +1,73 @@ +librest_extras_pkg_string = 'rest-extras-@0@'.format(librest_api_version) + +librest_extras_sources = [ + 'flickr-proxy.c', + 'flickr-proxy-call.c', + 'lastfm-proxy.c', + 'lastfm-proxy-call.c', + 'youtube-proxy.c', +] + +librest_extras_headers = [ + 'flickr-proxy.h', + 'flickr-proxy-call.h', + 'lastfm-proxy.h', + 'lastfm-proxy-call.h', + 'youtube-proxy.h', +] + +librest_extras_deps = [ + glib_dep, + libsoup_dep, + libxml_dep, + librest_dep, +] + +librest_extras_c_args = [ + '-DG_LOG_DOMAIN="Rest"', +] + +librest_extras_lib = library(librest_extras_pkg_string, + librest_extras_sources, + dependencies: librest_extras_deps, + c_args: librest_extras_c_args, + include_directories: config_h_inc, + version: librest_module_version, + soversion: librest_soversion, + install: true, +) + +install_headers(librest_extras_headers, + subdir: librest_pkg_string / 'rest-extras', +) + +librest_extras_dep = declare_dependency( + link_with: librest_extras_lib, +) + +if get_option('introspection') + librest_extras_gir = gnome.generate_gir(librest_extras_lib, + sources: librest_extras_headers, + namespace: 'RestExtras', + nsversion: librest_api_version, + includes: [ 'GObject-2.0', 'Gio-2.0', 'Soup-2.4' ], + extra_args: [ '--accept-unprefixed' ], + install: true, + ) +endif + +# Test suite +test_runner_c_args = [ + '-DBUILD_TESTS', +] + +test_runner_bin = executable('test-runner', + [ 'test-runner.c', librest_extras_sources ], + dependencies: librest_extras_deps, + c_args: test_runner_c_args, + include_directories: config_h_inc, +) + +test('test-runner', test_runner_bin, + suite: 'rest-extras', +) |