From: Tomas Krizek Date: Fri, 25 Jan 2019 12:45:28 +0000 (+0100) Subject: meson: add option to override modules dir X-Git-Tag: v4.0.0~24^2~240 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b4c2f97016fc1acb9ca4fc65a2207b72db5829a8;p=thirdparty%2Fknot-resolver.git meson: add option to override modules dir --- diff --git a/doc/build.rst b/doc/build.rst index 99f2c9250..4cf427457 100644 --- a/doc/build.rst +++ b/doc/build.rst @@ -168,6 +168,8 @@ Building for packages The build system supports DESTDIR_ +TODO no longer support, use meson --prefix instead (DESTDIR will cause invalid path to modules) + .. Our amalgamation has fallen into an unmaintained state and probably doesn't work. .. and `amalgamated builds `_. diff --git a/meson.build b/meson.build index 58971d1a7..8f3a44fac 100644 --- a/meson.build +++ b/meson.build @@ -6,8 +6,13 @@ project( ) libkres_soversion = 9 -# TODO change modules_dir to sensible lua(jit) default -modules_dir = join_paths(get_option('libdir'), 'kdns_modules') +if get_option('modules_dir') == '' + modules_dir = join_paths( + get_option('prefix'), get_option('libdir'), 'knot-resolver') +else + modules_dir = get_option('modules_dir') +endif +message('modules_dir: ' + modules_dir) # Project-wide dependencies diff --git a/meson_options.txt b/meson_options.txt index 750fdeac2..2580a5d74 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ option('cookies', type: 'boolean', value: false, description: 'Support for DNS Cookies.') option('client', type : 'boolean', value : true, description: 'kresc client binary') option('daemon', type: 'boolean', value: true, description: 'kresd daemon binary') +option('modules_dir', type: 'string', description: 'path to kres modules directory')