# 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-rotation.c)
-
-IF(_WITH_WAYLAND)
- ADD_DEFINITIONS("-DWAYLAND")
-ENDIF(_WITH_WAYLAND)
-
-IF(_WITH_X11)
- ADD_DEFINITIONS("-DX11")
- SET(SRCS_common ${SRCS_common} src/appcore-X.c)
-ENDIF(_WITH_X11)
-
-SET(HEADERS_common appcore-common.h)
+SET(SRCS_common
+ src/legacy/appcore.c
+ src/legacy/appcore-measure.c
+ src/legacy/appcore-rotation.c
+ src/legacy/appcore-i18n.c
+ src/base/appcore_base.c
+ src/base/appcore_base_control.c
+ src/watchdog/appcore_watchdog.c)
+
+SET(HEADERS_common
+ appcore-common.h
+ appcore_base.h
+ appcore_watchdog.h
+ appcore_base_control.h)
INCLUDE(FindPkgConfig)
-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)
-
+SET(APPCORE_PKG_CHECK_MODULES "gio-2.0 vconf sensor aul dlog capi-system-info")
pkg_check_modules(pkg_common REQUIRED ${APPCORE_PKG_CHECK_MODULES})
SET_TARGET_PROPERTIES(${APPCORE_COMMON} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_common})
TARGET_LINK_LIBRARIES(${APPCORE_COMMON} ${pkg_common_LDFLAGS} "-ldl")
-IF(_WITH_WAYLAND)
- CONFIGURE_FILE(${APPCORE_COMMON}-wayland.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)
+CONFIGURE_FILE(${APPCORE_COMMON}.pc.in ${APPCORE_COMMON}.pc @ONLY)
INSTALL(TARGETS ${APPCORE_COMMON} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPCORE_COMMON}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
FOREACH(hfile ${HEADERS_common})
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/${hfile} DESTINATION include/appcore)
ENDFOREACH(hfile)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/SLP_Appcore_PG.h DESTINATION include)
+
+#################################################################
+# Build appcore-ui Library
+# ------------------------------
+SET(APPCORE_UI "appcore-ui")
+SET(SRCS_ui src/ui_base/appcore_ui_base.c src/ui_base/appcore_ui_plugin.c)
+SET(HEADERS_ui appcore_ui_base.h)
+
+INCLUDE(FindPkgConfig)
+SET(APPCORE_UI_PKG_CHECK_MODULES "dlog ecore gobject-2.0 glib-2.0 aul bundle pkgmgr-info ttrace ecore-wl2 tizen-extension-client wayland-client")
+
+pkg_check_modules(pkg_ui REQUIRED ${APPCORE_UI_PKG_CHECK_MODULES})
+
+FOREACH(flag ${pkg_ui_CFLAGS})
+ SET(EXTRA_CFLAGS_ui "${EXTRA_CFLAGS_ui} ${flag}")
+ENDFOREACH(flag)
+
+ADD_LIBRARY(${APPCORE_UI} SHARED ${SRCS_ui})
+SET_TARGET_PROPERTIES(${APPCORE_UI} PROPERTIES SOVERSION ${MAJORVER})
+SET_TARGET_PROPERTIES(${APPCORE_UI} PROPERTIES VERSION ${FULLVER})
+SET_TARGET_PROPERTIES(${APPCORE_UI} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_ui})
+TARGET_LINK_LIBRARIES(${APPCORE_UI} ${pkg_ui_LDFLAGS} ${APPCORE_COMMON})
+
+CONFIGURE_FILE(${APPCORE_UI}.pc.in ${APPCORE_UI}.pc @ONLY)
+
+INSTALL(TARGETS ${APPCORE_UI} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPCORE_UI}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+FOREACH(hfile ${HEADERS_ui})
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/${hfile} DESTINATION include/appcore)
+ENDFOREACH(hfile)
#################################################################
# Build appcore-efl Library
# ------------------------------
SET(APPCORE_EFL "appcore-efl")
-SET(SRCS_efl src/appcore-efl.c src/appcore-group.c)
-SET(HEADERS_efl appcore-efl.h)
+SET(SRCS_efl src/legacy/appcore-efl.c src/efl_base/appcore_efl_base.c)
+SET(HEADERS_efl appcore-efl.h appcore_efl_base.h)
INCLUDE(FindPkgConfig)
-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)
+SET(APPCORE_PKG_CHECK_MODULES2 "elementary dlog aul bundle")
pkg_check_modules(pkg_efl REQUIRED ${APPCORE_PKG_CHECK_MODULES2})
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})
+TARGET_LINK_LIBRARIES(${APPCORE_EFL} ${pkg_efl_LDFLAGS} ${APPCORE_UI})
CONFIGURE_FILE(${APPCORE_EFL}.pc.in ${APPCORE_EFL}.pc @ONLY)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/${hfile} DESTINATION include/appcore)
ENDFOREACH(hfile)
+#################################################################
+# Build appcore-multiwindow Library
+# ------------------------------
+SET(APPCORE_MULTIWINDOW "appcore-multiwindow")
+SET(SRCS_mw src/multiwindow_base/appcore_multiwindow_base.c
+ src/multiwindow_base/appcore_multiwindow_base_class.c
+ src/multiwindow_base/appcore_multiwindow_base_instance.c
+ src/multiwindow_base/appcore_multiwindow_base_window.c
+ )
+SET(HEADERS_mw appcore_multiwindow_base.h)
+
+INCLUDE(FindPkgConfig)
+SET(APPCORE_MULTIWINDOW_PKG_CHECK_MODULES "dlog ecore gobject-2.0 glib-2.0 aul ecore-wl2")
+
+pkg_check_modules(pkg_mw REQUIRED ${APPCORE_MULTIWINDOW_PKG_CHECK_MODULES})
+
+FOREACH(flag ${pkg_mw_CFLAGS})
+ SET(EXTRA_CFLAGS_mw "${EXTRA_CFLAGS_mw} ${flag}")
+ENDFOREACH(flag)
+
+ADD_LIBRARY(${APPCORE_MULTIWINDOW} SHARED ${SRCS_mw})
+SET_TARGET_PROPERTIES(${APPCORE_MULTIWINDOW} PROPERTIES SOVERSION ${MAJORVER})
+SET_TARGET_PROPERTIES(${APPCORE_MULTIWINDOW} PROPERTIES VERSION ${FULLVER})
+SET_TARGET_PROPERTIES(${APPCORE_MULTIWINDOW} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_mw})
+TARGET_LINK_LIBRARIES(${APPCORE_MULTIWINDOW} ${pkg_mw_LDFLAGS} ${APPCORE_COMMON})
+
+CONFIGURE_FILE(${APPCORE_MULTIWINDOW}.pc.in ${APPCORE_MULTIWINDOW}.pc @ONLY)
+
+INSTALL(TARGETS ${APPCORE_MULTIWINDOW} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPCORE_MULTIWINDOW}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+FOREACH(hfile ${HEADERS_mw})
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/${hfile} DESTINATION include/appcore)
+ENDFOREACH(hfile)