gplugin/gplugin

Fix the build when ran in a meson subproject.
feature/meson-subproject-fix
2019-08-12, Gary Kramlich
923cbd2a8055
Parents 07041918dfcd
Children 6354bdbff214
Fix the build when ran in a meson subproject.

We were using meson.build_root() when we should have been using
meson.current_build_dir().
--- a/lua/tests/meson.build Fri Aug 16 04:23:26 2019 +0000
+++ b/lua/tests/meson.build Mon Aug 12 21:14:06 2019 -0500
@@ -2,7 +2,7 @@
e = executable('test-lua-loader', 'test-lua-loader.c',
c_args : [
- '-DLUA_LOADER_DIR="@0@/lua"'.format(meson.build_root()),
+ '-DLUA_LOADER_DIR="@0@"'.format(join_paths(meson.current_build_dir(), '..')),
'-DLUA_PLUGIN_DIR="@0@/lua-plugins"'.format(
meson.current_source_dir()),
'-DMOONSCRIPT_PLUGIN_DIR="@0@/moonscript-plugins"'.format(
@@ -15,7 +15,7 @@
if get_option('moonscript-tests')
e = executable('test-lua-moon-loader', 'test-lua-moon-loader.c',
c_args : [
- '-DLUA_LOADER_DIR="@0@/lua"'.format(meson.build_root()),
+ '-DLUA_LOADER_DIR="@0@"'.format(join_paths(meson.current_build_dir(), '..')),
'-DLUA_PLUGIN_DIR="@0@/lua-plugins"'.format(
meson.current_source_dir()),
'-DMOONSCRIPT_PLUGIN_DIR="@0@/moonscript-plugins"'.format(
--- a/python/tests/meson.build Fri Aug 16 04:23:26 2019 +0000
+++ b/python/tests/meson.build Mon Aug 12 21:14:06 2019 -0500
@@ -3,7 +3,7 @@
e = executable('test-python-loader', 'test-python-loader.c',
include_directories : include_directories('.'),
c_args : [
- '-DPYTHON_LOADER_DIR="@0@/python"'.format(meson.build_root()),
+ '-DPYTHON_LOADER_DIR="@0@"'.format(join_paths(meson.current_build_dir(), '..')),
'-DPYTHON_PLUGIN_DIR="@0@/plugins"'.format(meson.current_source_dir()),
],
link_with : gplugin_loader_tests,
@@ -15,7 +15,7 @@
e = executable('test-python-utils', 'test-python-utils.c',
include_directories : include_directories('.'),
c_args : [
- '-DPYTHON_LOADER_DIR="@0@/python"'.format(meson.build_root()),
+ '-DPYTHON_LOADER_DIR="@0@"'.format(join_paths(meson.current_build_dir(), '..')),
'-DPYTHON_PLUGIN_DIR="@0@/plugins"'.format(meson.current_source_dir()),
],
link_with : [gplugin_loader_tests],