SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(EXEC_PREFIX "\${prefix}")
-SET(LIBDIR "\${prefix}/lib")
+SET(LIBDIR ${LIB_INSTALL_DIR})
SET(INCLUDEDIR "\${prefix}/include")
-SET(VERSION_MAJOR 1)
-SET(VERSION "${VERSION_MAJOR}.1")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -Wall")
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wl,--as-needed")
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Werror")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
SET(CMAKE_SKIP_BUILD_RPATH TRUE)
SET(APPCORE_COMMON "appcore-common")
SET(SRCS_common src/appcore.c src/appcore-i18n.c src/appcore-measure.c src/appcore-rotation.c)
-IF (with_wayland)
+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)
+ENDIF(_WITH_X11)
SET(HEADERS_common appcore-common.h)
INCLUDE(FindPkgConfig)
-SET(APPCORE_PKG_CHECK_MODULES "vconf sensor aul dlog libtzplatform-config")
+SET(APPCORE_PKG_CHECK_MODULES "gio-2.0 vconf sensor aul dlog ecore capi-system-info")
+IF(_WITH_X11)
+ SET(APPCORE_PKG_CHECK_MODULES "${APPCORE_PKG_CHECK_MODULES} x11 eina ecore-x")
+ENDIF(_WITH_X11)
+IF(_WITH_WAYLAND)
+ SET(APPCORE_PKG_CHECK_MODULES "${APPCORE_PKG_CHECK_MODULES} ecore-wayland wayland-client tizen-extension-client wayland-tbm-client")
+ENDIF(_WITH_WAYLAND)
+
-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}")
ENDFOREACH(flag)
ADD_LIBRARY(${APPCORE_COMMON} SHARED ${SRCS_common})
-SET_TARGET_PROPERTIES(${APPCORE_COMMON} PROPERTIES SOVERSION ${VERSION_MAJOR})
-SET_TARGET_PROPERTIES(${APPCORE_COMMON} PROPERTIES VERSION ${VERSION})
+SET_TARGET_PROPERTIES(${APPCORE_COMMON} PROPERTIES SOVERSION ${MAJORVER})
+SET_TARGET_PROPERTIES(${APPCORE_COMMON} PROPERTIES VERSION ${FULLVER})
SET_TARGET_PROPERTIES(${APPCORE_COMMON} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_common})
TARGET_LINK_LIBRARIES(${APPCORE_COMMON} ${pkg_common_LDFLAGS} "-ldl")
-IF (with_wayland)
+IF(_WITH_WAYLAND)
CONFIGURE_FILE(${APPCORE_COMMON}-wayland.pc.in ${APPCORE_COMMON}.pc @ONLY)
-ELSE (with_wayland)
+ENDIF(_WITH_WAYLAND)
+IF(_WITH_X11)
CONFIGURE_FILE(${APPCORE_COMMON}-x.pc.in ${APPCORE_COMMON}.pc @ONLY)
-ENDIF (with_wayland)
+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)
# Build appcore-efl Library
# ------------------------------
SET(APPCORE_EFL "appcore-efl")
-SET(SRCS_efl src/appcore-efl.c)
+SET(SRCS_efl src/appcore-efl.c src/appcore-group.c)
SET(HEADERS_efl appcore-efl.h)
INCLUDE(FindPkgConfig)
-SET(APPCORE_PKG_CHECK_MODULES2 "elementary dlog ecore gobject-2.0 glib-2.0 aul")
+SET(APPCORE_PKG_CHECK_MODULES2 "elementary dlog ecore gobject-2.0 glib-2.0 aul pkgmgr-info ttrace capi-system-info")
+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}")
ENDFOREACH(flag)
ADD_LIBRARY(${APPCORE_EFL} SHARED ${SRCS_efl})
-SET_TARGET_PROPERTIES(${APPCORE_EFL} PROPERTIES SOVERSION ${VERSION_MAJOR})
-SET_TARGET_PROPERTIES(${APPCORE_EFL} PROPERTIES VERSION ${VERSION})
+SET_TARGET_PROPERTIES(${APPCORE_EFL} PROPERTIES SOVERSION ${MAJORVER})
+SET_TARGET_PROPERTIES(${APPCORE_EFL} PROPERTIES VERSION ${FULLVER})
SET_TARGET_PROPERTIES(${APPCORE_EFL} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_efl})
TARGET_LINK_LIBRARIES(${APPCORE_EFL} ${pkg_efl_LDFLAGS} ${APPCORE_COMMON})