diff --git a/lcm-lua/meson.build b/lcm-lua/meson.build index e3cd18fe7..82ad6ca62 100644 --- a/lcm-lua/meson.build +++ b/lcm-lua/meson.build @@ -1,7 +1,5 @@ lcm_lua_sources = ['init.c', 'lualcm_hash.c', 'lualcm_lcm.c', 'lualcm_pack.c', 'lua_ref_helper.c', 'utf8_check.c'] -lua_dep = dependency('lua') - lcm_lua_lib = library('lcm-lua', lcm_lua_sources, c_args : '-Wextra', dependencies : [lcm_lib_dep, lua_dep], diff --git a/lcm-python/meson.build b/lcm-python/meson.build index 472ee514d..c7d3de19b 100644 --- a/lcm-python/meson.build +++ b/lcm-python/meson.build @@ -1,4 +1,3 @@ -pymod = import('python') py_installation = pymod.find_installation() python_site = py_installation.get_path('platlib').replace(py_installation.get_path('data') / '', '') python_include = py_installation.get_path('include') diff --git a/meson.build b/meson.build index 8e67a71c8..57d08ffb6 100644 --- a/meson.build +++ b/meson.build @@ -42,7 +42,10 @@ endif # Python if not get_option('lcm_enable_python').disabled() - subdir('lcm-python') + pymod = import('python', required : get_option('lcm_enable_python')) + if pymod.found() + subdir('lcm-python') + endif endif # Java (Work in progress) @@ -55,7 +58,10 @@ endif # Lua if not get_option('lcm_enable_lua').disabled() - subdir('lcm-lua') + lua_dep = dependency('lua', required : get_option('lcm_enable_lua')) + if lua_dep.found() + subdir('lcm-lua') + endif endif # Disabled because require pro meson wizardry to support without user-defined functions