Add conditional build stuff 28/16328/1 accepted/tizen_3.0.2014.q3_common accepted/tizen_3.0.m14.3_ivi accepted/tizen_generic accepted/tizen_ivi_panda accepted/tizen_ivi_release tizen_3.0.2014.q3_common tizen_3.0.m14.2_ivi tizen_3.0.m14.3_ivi tizen_ivi_panda tizen_ivi_release accepted/tizen/generic/20140228.102616 accepted/tizen/ivi/20140228.192214 accepted/tizen/ivi/panda/20140403.015156 accepted/tizen/ivi/release/20140315.003535 accepted/tizen/mobile/20140303.023006 submit/tizen/20140228.102406 submit/tizen_ivi_panda/20140403.011817 submit/tizen_ivi_release/20140315.003757 submit/tizen_mobile/20141120.000000 tizen_3.0.2014.q3_common_release tizen_3.0.m14.2_ivi_release tizen_3.0.m14.3_ivi_release
authorAlex Wu <zhiwen.wu@linux.intel.com>
Thu, 13 Feb 2014 08:04:48 +0000 (16:04 +0800)
committerAlex Wu <zhiwen.wu@linux.intel.com>
Thu, 13 Feb 2014 08:07:06 +0000 (16:07 +0800)
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>
CMakeLists.txt
capi-ui-efl-util.pc.in
config.h.in
packaging/capi-ui-efl-util.spec
src/efl_util.c

index 2a5c456..c0b9e7b 100755 (executable)
@@ -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")
 
index 603d747..a73c2bd 100755 (executable)
@@ -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@
 
index cbc4efd..425d31f 100644 (file)
@@ -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
index 8e222bb..a1f6aba 100644 (file)
@@ -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)
 
index b7f5f4f..d3408bc 100755 (executable)
@@ -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)
        {