summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLi,Limin <liminx.li@intel.com>2014-01-08 14:34:40 +0800
committerLi,Limin <liminx.li@intel.com>2014-01-08 14:37:08 +0800
commitf2369c0077361edd85ee68af24944776096b6787 (patch)
treef5b8e812165d1a322ef72bd8552d7832a8dd070b /CMakeLists.txt
parentdae8725887b2dff263485cc510b48efe1da0e019 (diff)
downloadapp-core-f2369c0077361edd85ee68af24944776096b6787.tar.gz
app-core-f2369c0077361edd85ee68af24944776096b6787.tar.bz2
app-core-f2369c0077361edd85ee68af24944776096b6787.zip
The display server based on X or Wayland, is now a choice of different profile in Tizen 3.0. Basically and consistently, two macros were used "with wayland" and "with x". Below summarize the combination of the macros: | wayland | x | meaning |--------------------------- | 0 | 1 | pure X11 platform(no wayland) | 1 | 0 | pure wayland platform (no X11) | 1 | 1 | wayland but X compatibility | 0 | 0 | no X and no wayland This method unifies the meaning and usage. Deploy this method to app-core package. Signed-off-by: Li,Limin <liminx.li@intel.com> Change-Id: I5bbb83cf2e4769bed0e0c33bb646467ec77566f1
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt38
1 files changed, 29 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf8ee18..b4dba81 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,16 +23,25 @@ SET(CMAKE_SKIP_BUILD_RPATH TRUE)
# Build appcore-common Library
# ------------------------------
SET(APPCORE_COMMON "appcore-common")
-SET(SRCS_common src/appcore.c src/appcore-i18n.c src/appcore-measure.c
-# src/appcore-noti.c src/appcore-pmcontrol.c
- src/appcore-rotation.c
-# src/appcore-util.c
- src/appcore-X.c)
+SET(SRCS_common src/appcore.c src/appcore-i18n.c src/appcore-measure.c src/appcore-rotation.c)
+
+IF (with_wayland)
+ ADD_DEFINITIONS("-DWAYLAND")
+ELSE (with_wayland)
+ SET(SRCS_common ${SRCS_common} src/appcore-X.c)
+ENDIF (with_wayland)
+
SET(HEADERS_common appcore-common.h)
INCLUDE(FindPkgConfig)
-#pkg_check_modules(pkg_common REQUIRED pmapi vconf sensor aul rua dlog x11)
-pkg_check_modules(pkg_common REQUIRED vconf sensor aul dlog x11 ecore-x)
+SET(APPCORE_PKG_CHECK_MODULES "vconf sensor aul dlog")
+
+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)
+
FOREACH(flag ${pkg_common_CFLAGS})
SET(EXTRA_CFLAGS_common "${EXTRA_CFLAGS_common} ${flag}")
ENDFOREACH(flag)
@@ -43,7 +52,11 @@ SET_TARGET_PROPERTIES(${APPCORE_COMMON} PROPERTIES VERSION ${VERSION})
SET_TARGET_PROPERTIES(${APPCORE_COMMON} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_common})
TARGET_LINK_LIBRARIES(${APPCORE_COMMON} ${pkg_common_LDFLAGS} "-ldl")
-CONFIGURE_FILE(${APPCORE_COMMON}.pc.in ${APPCORE_COMMON}.pc @ONLY)
+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)
INSTALL(TARGETS ${APPCORE_COMMON} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPCORE_COMMON}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
@@ -60,7 +73,14 @@ SET(SRCS_efl src/appcore-efl.c)
SET(HEADERS_efl appcore-efl.h)
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkg_efl REQUIRED elementary dlog ecore ecore-x gobject-2.0 glib-2.0 aul)
+SET(APPCORE_PKG_CHECK_MODULES2 "elementary dlog ecore gobject-2.0 glib-2.0 aul")
+
+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)
+
FOREACH(flag ${pkg_efl_CFLAGS})
SET(EXTRA_CFLAGS_efl "${EXTRA_CFLAGS_efl} ${flag}")
ENDFOREACH(flag)