diff options
author | Jani Nikula <jani.nikula@intel.com> | 2017-10-24 11:14:14 +0300 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2017-10-24 15:27:40 +0300 |
commit | 1ae18b02965f1c3c6f7a1bcf0b7ed1f0a81af5e6 (patch) | |
tree | 2043196674e6cf787bd4b68273715382ccbeb8fc /meson.build | |
parent | ae3b166bf86fe27d165baf84494f98f4317e7726 (diff) |
meson: don't assume xmlrpc-c-config is there
xmlrpc is an optional dependency. If pkg-config can't find it, don't
assume xmlrpc-c-config will be there either. Make xmlrpc-c-config
optional too.
Fixes error:
Meson encountered an error in file meson.build, line 73, column 1:
Program or command 'xmlrpc-c-config' not foundor not executable
Fixes: 892abc602a8a ("meson: Add fallback for xmlrpc discovery")
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/meson.build b/meson.build index ac991c2f..fb81c4db 100644 --- a/meson.build +++ b/meson.build @@ -69,9 +69,10 @@ xmlrpc = dependency('xmlrpc', required : false) xmlrpc_util = dependency('xmlrpc_util', required : false) xmlrpc_client = dependency('xmlrpc_client', required : false) -if not xmlrpc.found() - libs_cmd = run_command('xmlrpc-c-config', 'client', '--libs') - cflags_cmd = run_command('xmlrpc-c-config', 'client', '--cflags') +xmlrpc_cmd = find_program('xmlrpc-c-config', required : false) +if not xmlrpc.found() and xmlrpc_cmd.found() + libs_cmd = run_command(xmlrpc_cmd, 'client', '--libs') + cflags_cmd = run_command(xmlrpc_cmd, 'client', '--cflags') if libs_cmd.returncode() == 0 and cflags_cmd.returncode() == 0 xmlrpc = declare_dependency(compile_args: cflags_cmd.stdout().strip().split(), |