diff options
author | Alex Wu <zhiwen.wu@linux.intel.com> | 2014-02-13 16:04:48 +0800 |
---|---|---|
committer | Alex Wu <zhiwen.wu@linux.intel.com> | 2014-02-13 16:07:06 +0800 |
commit | 12d91efbabbf6f43c272630e9a3f4b1e2e5d9533 (patch) | |
tree | 488913a00fb4629bd7d6d19a4b913a3e031b996f | |
parent | cd59af8f9aceab2b2cef52ac2fc122cb5e028702 (diff) | |
download | efl-util-accepted/tizen_ivi_release.tar.gz efl-util-accepted/tizen_ivi_release.tar.bz2 efl-util-accepted/tizen_ivi_release.zip |
Add conditional build stufftizen_3.0.m14.3_ivi_releasetizen_3.0.m14.2_ivi_releasetizen_3.0.2014.q3_common_releasesubmit/tizen_mobile/20141120.000000submit/tizen_ivi_release/20140315.003757submit/tizen_ivi_panda/20140403.011817submit/tizen/20140228.102406accepted/tizen/mobile/20140303.023006accepted/tizen/ivi/release/20140315.003535accepted/tizen/ivi/panda/20140403.015156accepted/tizen/ivi/20140228.192214accepted/tizen/generic/20140228.102616tizen_ivi_releasetizen_ivi_pandatizen_3.0.m14.3_ivitizen_3.0.m14.2_ivitizen_3.0.2014.q3_commonaccepted/tizen_ivi_releaseaccepted/tizen_ivi_pandaaccepted/tizen_genericaccepted/tizen_3.0.m14.3_iviaccepted/tizen_3.0.2014.q3_common
With this patch, capi-ui-efl-util pass build on wayland repo.
Change-Id: Ic83bc72cbb2d24abccd737fe9773409e985ab325
Signed-off-by: Alex Wu <zhiwen.wu@linux.intel.com>
-rwxr-xr-x | CMakeLists.txt | 7 | ||||
-rwxr-xr-x | capi-ui-efl-util.pc.in | 2 | ||||
-rw-r--r-- | config.h.in | 2 | ||||
-rw-r--r-- | packaging/capi-ui-efl-util.spec | 3 | ||||
-rwxr-xr-x | src/efl_util.c | 4 |
5 files changed, 14 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a5c456..c0b9e7b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,13 @@ FOREACH(flag ${${ECORE_X}_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) +IF (ECORE_X_FOUND) + SET(HAVE_X "1") + SET(deps "${deps} ecore-x utilX") +ELSE (ECORE_X_FOUND) + SET(HAVE_X "0") +ENDIF (ECORE_X_FOUND) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") diff --git a/capi-ui-efl-util.pc.in b/capi-ui-efl-util.pc.in index 603d747..a73c2bd 100755 --- a/capi-ui-efl-util.pc.in +++ b/capi-ui-efl-util.pc.in @@ -9,7 +9,7 @@ includedir=/usr/include/ui Name: @PC_NAME@ Description: @PACKAGE_DESCRIPTION@ Version: @VERSION@ -Requires: @ECORE_X@ @PC_REQUIRED@ +Requires: @deps@ @PC_REQUIRED@ Libs: -L${libdir} @PC_LDFLAGS@ Cflags: -I${includedir} @PC_CFLAGS@ diff --git a/config.h.in b/config.h.in index cbc4efd..425d31f 100644 --- a/config.h.in +++ b/config.h.in @@ -1,7 +1,7 @@ #ifndef _CONFIG_H_H_ #define _CONFIG_H_H_ -#define ECORE_X_FOUND @ECORE_X_FOUND@ +#define ECORE_X_FOUND @HAVE_X@ // use the cmake @ECORE_WAYLAND_FOUND@ when wayland supported #define ECORE_WAYLAND_FOUND 0 diff --git a/packaging/capi-ui-efl-util.spec b/packaging/capi-ui-efl-util.spec index 8e222bb..a1f6aba 100644 --- a/packaging/capi-ui-efl-util.spec +++ b/packaging/capi-ui-efl-util.spec @@ -1,3 +1,4 @@ +%bcond_with x Name: capi-ui-efl-util Summary: An EFL utility library in SLP C API Version: 0.1.0 @@ -8,8 +9,10 @@ Source0: %{name}-%{version}.tar.gz Source1001: capi-ui-efl-util.manifest BuildRequires: cmake BuildRequires: pkgconfig(dlog) +%if %{with x} BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(utilX) +%endif BuildRequires: pkgconfig(elementary) BuildRequires: pkgconfig(capi-base-common) diff --git a/src/efl_util.c b/src/efl_util.c index b7f5f4f..d3408bc 100755 --- a/src/efl_util.c +++ b/src/efl_util.c @@ -75,13 +75,13 @@ int efl_util_set_notification_window_level (Evas_Object* window, efl_util_notifi int efl_util_get_notification_window_level (Evas_Object* window, efl_util_notification_level_e* level) { - Ecore_X_Window_Type window_type; - Utilx_Notification_Level utilx_level; EINA_SAFETY_ON_NULL_RETURN_VAL(window, EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE); #if ECORE_X_FOUND + Ecore_X_Window_Type window_type; + Utilx_Notification_Level utilx_level; Ecore_X_Window xwin = elm_win_xwindow_get(window); if (xwin) { |