CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(email-storage)
+PROJECT(email-core)
SET(CMAKE_SKIP_BUILD_RPATH TRUE)
MESSAGE(">>> Build type: ${CMAKE_BUILD_TYPE}")
-SET(VISIBILITY "-DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\"")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VISIBILITY} -fvisibility=hidden")
+
+##########################################################
+# Define device lib
+##########################################################
+
+SET(DEVICE-LIB "email-device")
+SET(DEVICE-SRCS
+ ./email-device/email-device.c
+)
+
+INCLUDE_DIRECTORIES(
+ ${CMAKE_SOURCE_DIR}/email-common-use/include
+ ${CMAKE_SOURCE_DIR}/email-core/email-device/include
+)
+
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(storage_pkgs REQUIRED glib-2.0 dlog vconf dbus-1)
+
+set(EXTRA_CFLAGS "")
+FOREACH(flag ${device_pkgs_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+
+#message(">>> extra_cflags ${EXTRA_CFLAGS}")
+#message(">>> result ${CMAKE_C_FLAGS}")
+
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
+
+ADD_LIBRARY(${DEVICE-LIB} SHARED ${DEVICE-SRCS})
+TARGET_LINK_LIBRARIES(${DEVICE-LIB} ${device_LDFLAGS} ${BASE-LIB})
+SET_TARGET_PROPERTIES(${DEVICE-LIB} PROPERTIES SOVERSION ${VERSION_MAJOR})
+SET_TARGET_PROPERTIES(${DEVICE-LIB} PROPERTIES VERSION ${VERSION})
+
+INSTALL(TARGETS ${DEVICE-LIB} DESTINATION lib COMPONENT RuntimeLibraries)
+
+
##########################################################
-# Define STORAGE lib
+# Define storage lib
##########################################################
SET(STORAGE-LIB "email-storage")
SET(STORAGE-SRCS
- ./em-storage/em-storage-noti.c
- ./em-storage/em-storage.c
- ${CMAKE_SOURCE_DIR}/emf-emn-storage/emf-emn-storage.c
+ ./email-storage/email-storage.c
)
INCLUDE_DIRECTORIES(
- ${CMAKE_ROOT_DIR}/include/common/include
- ${CMAKE_ROOT_DIR}/include
- ${CMAKE_SOURCE_DIR}/include
- ${CMAKE_SOURCE_DIR}/em-storage/include
+ ${CMAKE_SOURCE_DIR}/email-common-use/include
+ ${CMAKE_SOURCE_DIR}/email-daemon/include
+ ${CMAKE_SOURCE_DIR}/email-core/include
+ ${CMAKE_SOURCE_DIR}/email-core/email-storage/include
)
INCLUDE(FindPkgConfig)
-pkg_check_modules(storage_pkgs REQUIRED drm-service glib-2.0 dlog db-util openssl vconf secure-storage dbus-1 contacts-service)
+pkg_check_modules(storage_pkgs REQUIRED drm-client glib-2.0 dlog db-util openssl vconf secure-storage dbus-1 contacts-service2)
set(EXTRA_CFLAGS "")
FOREACH(flag ${storage_pkgs_CFLAGS})
SET_TARGET_PROPERTIES(${STORAGE-LIB} PROPERTIES SOVERSION ${VERSION_MAJOR})
SET_TARGET_PROPERTIES(${STORAGE-LIB} PROPERTIES VERSION ${VERSION})
-#INSTALL(TARGETS ${STORAGE-LIB} LIBRARY DESTINATION lib)
INSTALL(TARGETS ${STORAGE-LIB} DESTINATION lib COMPONENT RuntimeLibraries)
SET(NETWORK-LIB "email-network")
SET(NETWORK-SRCS
- ./em-network/em-network.c
+ ./email-network/email-network.c
)
INCLUDE_DIRECTORIES(
- ${CMAKE_SOURCE_DIR}/include/common/include
- ${CMAKE_SOURCE_DIR}/include
+ ${CMAKE_SOURCE_DIR}/email-common-use/include
+ ${CMAKE_SOURCE_DIR}/email-daemon/include
${CMAKE_SOURCE_DIR}/email-core/include
- ${CMAKE_SOURCE_DIR}/email-core/em-storage/include
+ ${CMAKE_SOURCE_DIR}/email-core/email-storage/include
)
INCLUDE(FindPkgConfig)
SET(CORE-LIB "email-core")
SET(CORE-SRCS
- ${CMAKE_SOURCE_DIR}/email-core/em-core-event.c
- ${CMAKE_SOURCE_DIR}/email-core/em-core-imap-mailbox.c
- ${CMAKE_SOURCE_DIR}/email-core/em-core-mailbox.c
- ${CMAKE_SOURCE_DIR}/email-core/em-core-mailbox-sync.c
- ${CMAKE_SOURCE_DIR}/email-core/em-core-mesg.c
- ${CMAKE_SOURCE_DIR}/email-core/em-core-mm-callbacks.c
- ${CMAKE_SOURCE_DIR}/email-core/em-core-utils.c
- ${CMAKE_SOURCE_DIR}/email-core/em-core-api.c
- ${CMAKE_SOURCE_DIR}/email-core/em-core-smtp.c
- ${CMAKE_SOURCE_DIR}/email-core/em-core-timer.c
- ${CMAKE_SOURCE_DIR}/email-core/em-core-imap-idle.c
- ${CMAKE_SOURCE_DIR}/email-core/em-core-global.c
- ${CMAKE_SOURCE_DIR}/email-core/em-core-account.c
- ${CMAKE_SOURCE_DIR}/email-core/em-core-mime.c
- ${CMAKE_SOURCE_DIR}/email-core/em-core-sound.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-event.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-imap-mailbox.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-mailbox.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-mailbox-sync.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-mail.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-mm-callbacks.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-utils.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-api.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-smtp.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-timer.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-imap-idle.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-global.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-account.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-mime.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-smime.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-cert.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-sound.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-task-manager.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-tasks.c
+ ${CMAKE_SOURCE_DIR}/email-core/email-core-signal.c
)
INCLUDE_DIRECTORIES(
- ${CMAKE_SOURCE_DIR}/include/common/include
- ${CMAKE_SOURCE_DIR}/include/
- ${CMAKE_SOURCE_DIR}/email-core/em-storage/include
+ ${CMAKE_SOURCE_DIR}/email-common-use/include
+ ${CMAKE_SOURCE_DIR}/email-daemon/include/
${CMAKE_SOURCE_DIR}/email-core/include
- ${CMAKE_SOURCE_DIR}/Common/include
- ${CMAKE_SOURCE_DIR}/email-core/em-network/include
+ ${CMAKE_SOURCE_DIR}/email-core/email-storage/include
+ ${CMAKE_SOURCE_DIR}/email-core/email-network/include
+ ${CMAKE_SOURCE_DIR}/email-core/email-device/include
)
INCLUDE(FindPkgConfig)
-pkg_check_modules(core_pkgs REQUIRED glib-2.0 drm-service dlog dbus-1 gthread-2.0 uw-imap-toolkit vconf contacts-service secure-storage openssl accounts-svc mm-player mm-session devman_haptic alarm-service notification libcurl libxml-2.0)
+pkg_check_modules(core_pkgs REQUIRED glib-2.0 drm-client dlog dbus-1 gthread-2.0 uw-imap-toolkit vconf vconf-internal-keys contacts-service2 secure-storage openssl accounts-svc mm-player mm-session feedback alarm-service notification libcurl libxml-2.0 cert-svc cert-svc-vcore badge)
set(EXTRA_CFLAGS "")
FOREACH(flag ${core_pkgs_CFLAGS})
ADD_LIBRARY(${CORE-LIB} SHARED ${CORE-SRCS})
-TARGET_LINK_LIBRARIES(${CORE-LIB} ${core_pkgs_LDFLAGS} ${STORAGE-LIB} ${NETWORK-LIB})
+TARGET_LINK_LIBRARIES(${CORE-LIB} ${core_pkgs_LDFLAGS} ${STORAGE-LIB} ${NETWORK-LIB} ${DEVICE-LIB})
SET_TARGET_PROPERTIES(${CORE-LIB} PROPERTIES SOVERSION ${VERSION_MAJOR})
SET_TARGET_PROPERTIES(${CORE-LIB} PROPERTIES VERSION ${VERSION})