evas_filter_parser: add a workaround for in-tree runs

Without this, the prefix would get pointed to something like
/path/to/efl/build/share/evas, which is not a valid path when
building. That would cause the docs build to fail.
devs/lauromoura/cv-finalize-csharp
Daniel Kolesa 3 years ago
parent e25a56077c
commit 4ec5760771
  1. 6
      doc/meson.build
  2. 8
      src/lib/evas/filters/evas_filter_parser.c

@ -114,7 +114,11 @@ foreach text_filter_property : text_filter_properties
filter_code = run_command('cat', join_paths(meson.source_root(), 'src', 'examples', 'evas', 'filters', 'filter_'+name+'.lua'))
doc_target += custom_target('preview_text_filters_'+name,
command: [env, 'EFL_RUN_IN_TREE=1', preview_text_filter.full_path(), text, filter_code.stdout(), '@OUTPUT@', font, size],
command: [
env, 'EFL_RUN_IN_TREE=1',
'EFL_EVAS_FILTER_LUA_PREFIX=' + join_paths(meson.source_root(), 'src', 'lib', 'evas'),
preview_text_filter.full_path(), text, filter_code.stdout(), '@OUTPUT@', font, size
],
depends: preview_text_filter,
output: 'filter_'+name+'.png',
build_by_default: false

@ -2262,7 +2262,13 @@ static char *_lua_color_code = NULL;
static inline void
_lua_import_path_get(char *path, size_t len, const char *name)
{
const char *pfx = _evas_module_datadir_get();
const char *pfx = NULL;
/* a hack for in-tree runs, can point this to src/lib/evas */
if (getenv("EFL_RUN_IN_TREE"))
pfx = getenv("EFL_EVAS_FILTER_LUA_PREFIX");
/* the real path not for in-tree runs */
if (!pfx)
pfx = _evas_module_datadir_get();
size_t r = 0;
#ifdef FILTERS_DEBUG

Loading…
Cancel
Save