diff options
author | Günther Wagner <info@gunibert.de> | 2021-10-21 16:32:29 +0000 |
---|---|---|
committer | Günther Wagner <info@gunibert.de> | 2021-10-21 16:32:29 +0000 |
commit | c10242ed45eb6bcb5f27a2a2e7b7eda944324179 (patch) | |
tree | 4c6ad28e608d054c3984cf274fcf672a6247e9eb /rest-extras | |
parent | 409dec8b596bb6cc3b8e25d0572bf5cd38130968 (diff) | |
parent | ddaa3514ab188eb313c302f26dd5c12916a3eced (diff) | |
download | librest-c10242ed45eb6bcb5f27a2a2e7b7eda944324179.tar.gz |
Merge branch 'wip/gwagner/meson' into 'master'
Port to the Meson build system
See merge request GNOME/librest!7
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', +) |