summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2017-12-04 16:15:46 +0800
committerTomas Popela <tpopela@redhat.com>2018-04-11 12:39:20 +0200
commit8ca4cb1e5560968d8efd46a3770785fa2d4d345b (patch)
tree907721880a43b2c06cc4178805f7bf94936b8ba6
parent193d71878368ca8856a8a1e98f0fa1ea3383b898 (diff)
downloadlibsoup-8ca4cb1e5560968d8efd46a3770785fa2d4d345b.tar.gz
meson: Fix build in cases when we don't have Apache installed
Set the cflag that specifies the Apache-2.4.x daemon/service exectuable only when it is found, otherwise configuration will fail.
-rw-r--r--tests/meson.build5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/meson.build b/tests/meson.build
index 27488cba..c7060cd1 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,8 +1,11 @@
test_utils = library('test-utils', 'test-utils.c', 'test-utils.h',
install : false,
- c_args : '-DAPACHE_HTTPD=' + cdata.get('APACHE_HTTPD'),
dependencies : [glib_dep, libsoup_dep])
+if apache_httpd2.found()
+ add_project_arguments('-DAPACHE_HTTPD=' + cdata.get('APACHE_HTTPD'), language : 'c')
+endif
+
# ['name', is_parallel]
tests = [
['auth', false],