From fa25e7b63a5915c14a2cb6303c831b45ab445478 Mon Sep 17 00:00:00 2001 From: "Wonsik, Jung" Date: Thu, 8 Mar 2018 16:42:56 +0900 Subject: [PATCH] [Tizen] ecore-wl: fix build issue Change-Id: Ib9b504bfbed09a0699aa570c0a39d50d8c5e7caa Signed-off-by: huiyu.eun --- configure.ac | 10 +++++----- dali-csharp-binder/Makefile.am | 9 +++++---- dali-csharp-binder/src/key-grab.cpp | 2 ++ packaging/dali-csharp-binder.spec | 13 +++++++------ 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index b9ffe05..420a8f7 100755 --- a/configure.ac +++ b/configure.ac @@ -18,13 +18,13 @@ AC_ARG_ENABLE(tizenBuild, enable_tizenBuild=yes, enable_tizenBuild=no) -AC_ARG_ENABLE(Ecore_Wl2, - [ --enable-ecore-wl2 build with ecorewl2 on tizen], - enable_ecore_wl2=yes, - enable_ecore_wl2=no) +AC_ARG_ENABLE(ecoreWl2, + [ --enable-ecore-wl2 build on ecorewl2], + enable_ecoreWl2=yes, + enable_ecoreWl2=no) AM_CONDITIONAL([TIZENBUILD], [test x$enable_tizenBuild = xyes]) -AM_CONDITIONAL([ECOREWL2], [test "x$enable_ecore_wl2" = "xyes"]) +AM_CONDITIONAL([ECOREWL2], [test x$enable_ecoreWl2 = xyes]) PKG_PROG_PKG_CONFIG # Checks for libraries. added for widget_viewer_dali binding only for tizen diff --git a/dali-csharp-binder/Makefile.am b/dali-csharp-binder/Makefile.am index 361998c..8a7eb07 100755 --- a/dali-csharp-binder/Makefile.am +++ b/dali-csharp-binder/Makefile.am @@ -14,15 +14,16 @@ libdali_csharp_binder_la_CXXFLAGS = \ $(viewer_dali_CFLAGS) \ $(dali_csharp_binder_includes) +# added for key grab binding only for tizen +if TIZENBUILD +libdali_csharp_binder_la_CXXFLAGS += -DTIZEN_BUILD if ECOREWL2 +libdali_csharp_binder_la_CXXFLAGS += -DECORE_WL2 +libdali_csharp_binder_la_CXXFLAGS += -DEFL_BETA_API_SUPPORT libdali_csharp_binder_la_CXXFLAGS+= $(ECORE_WL2_CFLAGS) else libdali_csharp_binder_la_CXXFLAGS+= $(ECORE_WAYLAND_CFLAGS) endif - -# added for key grab binding only for tizen -if TIZENBUILD -libdali_csharp_binder_la_CXXFLAGS += -DTIZEN_BUILD libdali_csharp_binder_la_SOURCES = $(dali_csharp_binder_src_files_tizen) else libdali_csharp_binder_la_SOURCES = $(dali_csharp_binder_src_files) diff --git a/dali-csharp-binder/src/key-grab.cpp b/dali-csharp-binder/src/key-grab.cpp index 8b3007b..41ce3c3 100755 --- a/dali-csharp-binder/src/key-grab.cpp +++ b/dali-csharp-binder/src/key-grab.cpp @@ -195,11 +195,13 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_GetNativeWindowHandler( void* window ) Dali::Any result; try { result = _win->GetNativeHandle(); +#ifdef TIZEN_BUILD #ifdef ECORE_WL2 Ecore_Wl2_Window * ecore_win = Dali::AnyCast(result); #else Ecore_Wl_Window * ecore_win = Dali::AnyCast(result); #endif +#endif ret = (void*)ecore_win; } catch (std::out_of_range& e) { diff --git a/packaging/dali-csharp-binder.spec b/packaging/dali-csharp-binder.spec index c956399..845b92a 100755 --- a/packaging/dali-csharp-binder.spec +++ b/packaging/dali-csharp-binder.spec @@ -11,10 +11,8 @@ BuildRequires: pkgconfig(dali-core) BuildRequires: pkgconfig(dali-adaptor) BuildRequires: pkgconfig(dali-toolkit) BuildRequires: pkgconfig(widget_viewer_dali) - -# dali-adaptor uses ecore mainloop %if 0%{?tizen_version_major} >= 5 -BuildRequires: pkgconfig(ecore-wl2) +BuildRequires: pkgconfig(ecore-wl2) %else BuildRequires: pkgconfig(ecore-wayland) %endif @@ -25,7 +23,6 @@ dali-csharp-binder %if 0%{?tizen_version_major} >= 5 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT" CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT" -configure_flags="--enable-ecore-wl2" %endif ############################## @@ -51,8 +48,12 @@ This package includes developer files common to all packages. %build %autogen # added for key grab binding only for tizen -%configure --enable-tizenBuild=yes \ - $configure_flags +%if 0%{?tizen_version_major} >= 5 +%configure --enable-ecoreWl2=yes \ + --enable-tizenBuild=yes +%else +%configure --enable-tizenBuild=yes +%endif make %{?_smp_mflags} -- 2.7.4