IF (with_wayland)
ADD_DEFINITIONS("-DWAYLAND")
-ELSE (with_wayland)
+ENDIF (with_wayland)
+IF (with_x11)
+ ADD_DEFINITIONS("-DX11")
SET(SRCS_common ${SRCS_common} src/appcore-X.c)
ENDIF (with_wayland)
SET(HEADERS_common appcore-common.h)
INCLUDE(FindPkgConfig)
-SET(APPCORE_PKG_CHECK_MODULES "vconf sensor aul dlog libtzplatform-config")
+SET(APPCORE_PKG_CHECK_MODULES "vconf sensor aul dlog libtzplatform-config ecore")
+IF (with_x11)
+ SET(APPCORE_PKG_CHECK_MODULES "${APPCORE_PKG_CHECK_MODULES} x11 ecore-x")
+ENDIF (with_x11)
-IF (with_wayland)
- pkg_check_modules(pkg_common REQUIRED ${APPCORE_PKG_CHECK_MODULES} ecore)
-ELSE (with_wayland)
- pkg_check_modules(pkg_common REQUIRED "${APPCORE_PKG_CHECK_MODULES} x11 ecore-x")
-ENDIF (with_wayland)
+pkg_check_modules(pkg_common REQUIRED ${APPCORE_PKG_CHECK_MODULES})
FOREACH(flag ${pkg_common_CFLAGS})
SET(EXTRA_CFLAGS_common "${EXTRA_CFLAGS_common} ${flag}")
IF (with_wayland)
CONFIGURE_FILE(${APPCORE_COMMON}-wayland.pc.in ${APPCORE_COMMON}.pc @ONLY)
-ELSE (with_wayland)
- CONFIGURE_FILE(${APPCORE_COMMON}-x.pc.in ${APPCORE_COMMON}.pc @ONLY)
ENDIF (with_wayland)
+IF (with_x11)
+ CONFIGURE_FILE(${APPCORE_COMMON}-x.pc.in ${APPCORE_COMMON}.pc @ONLY)
+ENDIF (with_x11)
INSTALL(TARGETS ${APPCORE_COMMON} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPCORE_COMMON}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
INCLUDE(FindPkgConfig)
SET(APPCORE_PKG_CHECK_MODULES2 "elementary dlog ecore gobject-2.0 glib-2.0 aul")
+IF (with_x11)
+ SET(APPCORE_PKG_CHECK_MODULES2 "${APPCORE_PKG_CHECK_MODULES2} ecore-x")
+ENDIF (with_x11)
-IF (with_wayland)
- pkg_check_modules(pkg_efl REQUIRED ${APPCORE_PKG_CHECK_MODULES2})
-ELSE (with_wayland)
- pkg_check_modules(pkg_efl REQUIRED "${APPCORE_PKG_CHECK_MODULES2} ecore-x")
-ENDIF (with_wayland)
+pkg_check_modules(pkg_efl REQUIRED ${APPCORE_PKG_CHECK_MODULES2})
FOREACH(flag ${pkg_efl_CFLAGS})
SET(EXTRA_CFLAGS_efl "${EXTRA_CFLAGS_efl} ${flag}")
Group: Application Framework/Libraries
License: Apache-2.0
Source0: app-core-%{version}.tar.gz
-%if %{with wayland} && !%{with x}
+%if %{with wayland}
Source101: packaging/core-efl-wayland.target
%else
Source101: packaging/core-efl-x.target
+%endif
+%if %{with x}
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(ecore-x)
%endif
Requires: pkgconfig(elementary)
Requires: pkgconfig(aul)
%if %{with x}
-Requires: pkgconfig(x11)
+Requires: pkgconfig(x11)
%endif
%description common-devel
%build
%cmake . \
-%if %{with wayland} && !%{with x}
+%if %{with wayland}
-Dwith_wayland=TRUE\
%endif
+%if %{with x}
+-Dwith_x11=TRUE\
+%endif
-DENABLE_GTK=OFF
make %{?jobs:-j%jobs}
#include <stdlib.h>
#ifdef WAYLAND
-#include <Ecore.h>
#include <Ecore_Wayland.h>
-#else
+#endif
+
+#ifdef X11
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <Ecore_X.h>
}
/* WM_ROTATE */
-#ifndef WAYLAND
+#ifdef X11
static Ecore_X_Atom _WM_WINDOW_ROTATION_SUPPORTED = 0;
static Ecore_X_Atom _WM_WINDOW_ROTATION_CHANGE_REQUEST = 0;
}
-#ifndef WAYLAND
+#ifdef X11
/* WM_ROTATE */
static Eina_Bool __cmsg_cb(void *data, int type, void *event)
{
#include <Ecore.h>
#include "appcore-internal.h"
-#ifndef WAYLAND
+#ifdef X11
#include <Ecore_X.h>
#include <X11/Xlib.h>
-#endif
-#ifndef WAYLAND
/*Fixme: to be added for wayland works*/
#define _MAKE_ATOM(a, s) \
do { \
rot.handle = handle;
__add_rotlock(data);
-#ifndef WAYLAND
+#ifdef X11
_MAKE_ATOM(ATOM_ROTATION_LOCK, STR_ATOM_ROTATION_LOCK );
root = ecore_x_window_root_first_get();
XSelectInput(ecore_x_display_get(), root, PropertyChangeMask);