Win32: Fix ecore_evas engine search path
authorJean-Philippe Andre <jp.andre@samsung.com>
Fri, 16 May 2014 07:32:59 +0000 (16:32 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 20 May 2014 06:13:43 +0000 (15:13 +0900)
Engines are stored in a lib/ folder, while the main DLL files
are in the bin/ folder, so the engine would never be found.

A solution was to add the proper checkme file in the share
folder, but since this is necessary only for Windows, we
can simply use ../lib instead of using the full eina_prefix
detector.

Thanks vtorri for the review.

src/Makefile_Ecore_Evas.am
src/lib/ecore_evas/ecore_evas_module.c

index 6cd53a6..4689f34 100644 (file)
@@ -26,7 +26,9 @@ lib/ecore_evas/ecore_evas_util.c
 
 lib_ecore_evas_libecore_evas_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
 -I$(top_srcdir)/src/modules/evas/engines/buffer \
+-DPACKAGE_BIN_DIR=\"$(bindir)\" \
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
+-DPACKAGE_DATA_DIR=\"$(datadir)/ecore_evas\" \
 -DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)\" \
 @ECORE_EVAS_CFLAGS@
 lib_ecore_evas_libecore_evas_la_LIBADD = @ECORE_EVAS_LIBS@
index 60ceb36..9539bc2 100644 (file)
@@ -101,9 +101,11 @@ _ecore_evas_engine_init(void)
 
    /* 1. libecore_evas.so/../ecore_evas/engines/ */
    paths[0] = eina_module_symbol_path_get(_ecore_evas_engine_init, "/ecore_evas/engines");
-   /* 2. PREFIX/ecore_evas/engines/ */
-#ifndef _MSC_VER
+#ifndef _WIN32
+   /* 3. PREFIX/ecore_evas/engines/ */
    paths[1] = strdup(PACKAGE_LIB_DIR "/ecore_evas/engines");
+#else
+   paths[1] = eina_module_symbol_path_get(_ecore_evas_engine_init, "/../lib/ecore_evas/engines");
 #endif
 
    for (j = 0; j < ((sizeof (paths) / sizeof (char*)) - 1); ++j)