diff options
author | Li,Limin <liminx.li@intel.com> | 2014-01-08 14:34:40 +0800 |
---|---|---|
committer | Li,Limin <liminx.li@intel.com> | 2014-01-08 14:37:08 +0800 |
commit | f2369c0077361edd85ee68af24944776096b6787 (patch) | |
tree | f5b8e812165d1a322ef72bd8552d7832a8dd070b /CMakeLists.txt | |
parent | dae8725887b2dff263485cc510b48efe1da0e019 (diff) | |
download | app-core-f2369c0077361edd85ee68af24944776096b6787.tar.gz app-core-f2369c0077361edd85ee68af24944776096b6787.tar.bz2 app-core-f2369c0077361edd85ee68af24944776096b6787.zip |
init wayland supportsubmit/tizen/20140116.012548accepted/tizen/mobile/20140116.011814accepted/tizen/ivi/20140117.181904
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.txt | 38 |
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) |