summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xCMakeLists.txt7
-rwxr-xr-xcapi-ui-efl-util.pc.in2
-rw-r--r--config.h.in2
-rw-r--r--packaging/capi-ui-efl-util.spec3
-rwxr-xr-xsrc/efl_util.c4
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)
{