[libsoup/wip/meson] meson: Fix build in cases when we don't have Apache installed



commit e4ef1fb5ba6bef46c8dbe4d57c125072df676883
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Dec 4 16:15:46 2017 +0800

    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.

 tests/meson.build |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/tests/meson.build b/tests/meson.build
index 27488cb..c7060cd 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],


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]