forked from enlightenment/efl
ecore_wl2: add support for intree loading of the module
Summary: the module was not loaded when we were running intree. Reviewers: ManMower, devilhorns Reviewed By: devilhorns Subscribers: devilhorns, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7023
This commit is contained in:
parent
945eeeab33
commit
4aa480f6d3
|
@ -26,7 +26,9 @@ static_libs/libdrm/exynos_drmif.h \
|
|||
static_libs/libdrm/i915_drm.h \
|
||||
static_libs/libdrm/intel_bufmgr.h \
|
||||
static_libs/libdrm/vc4_drm.h \
|
||||
static_libs/libdrm/LICENSE
|
||||
static_libs/libdrm/LICENSE \
|
||||
static_libs/buildsystem/buildsystem.h \
|
||||
static_libs/buildsystem/buildsystem_autotools.c
|
||||
|
||||
|
||||
nodist_lib_ecore_wl2_libecore_wl2_la_SOURCES = \
|
||||
|
@ -51,6 +53,8 @@ lib_ecore_wl2_libecore_wl2_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
|||
@ECORE_WL2_CFLAGS@ \
|
||||
-I$(top_srcdir)/src/static_libs/libdrm \
|
||||
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
||||
-DPACKAGE_SRC_DIR=\"$(abs_top_srcdir)\" \
|
||||
-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \
|
||||
-DMODULE_ARCH=\"$(MODULE_ARCH)\"
|
||||
lib_ecore_wl2_libecore_wl2_la_LIBADD = @ECORE_WL2_LIBS@
|
||||
lib_ecore_wl2_libecore_wl2_la_DEPENDENCIES = @ECORE_WL2_INTERNAL_LIBS@
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef NEED_RUN_IN_TREE
|
||||
# include "../../static_libs/buildsystem/buildsystem.h"
|
||||
#endif
|
||||
|
||||
#include "ecore_wl2_private.h"
|
||||
|
||||
/* local variables */
|
||||
|
@ -66,6 +70,23 @@ _ecore_wl2_surface_modules_init(void)
|
|||
{
|
||||
const char *mod_dir;
|
||||
|
||||
#ifdef NEED_RUN_IN_TREE
|
||||
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
|
||||
if (getuid() == geteuid())
|
||||
#endif
|
||||
{
|
||||
char path[PATH_MAX];
|
||||
//when running in tree we are ignoring all the settings
|
||||
//and just load the intree module that we have build
|
||||
if (bs_mod_get(path, sizeof(path), "ecore_wl2/engines","dmabuf"))
|
||||
{
|
||||
Eina_Module *local_module = eina_module_new(path);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(local_module, EINA_FALSE);
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_module_load(local_module), EINA_FALSE);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
supplied_modules = eina_module_arch_list_get(NULL,
|
||||
PACKAGE_LIB_DIR"/ecore_wl2/engines",
|
||||
MODULE_ARCH);
|
||||
|
|
Loading…
Reference in New Issue