1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 PROJECT(msg-server CXX)
4 SET(CMAKE_SKIP_BUILD_RPATH TRUE)
6 IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
7 SET(CMAKE_BUILD_TYPE "Debug")
8 ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
9 MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
11 SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -O0 -g -Wall")
13 ##########################################################
14 # Define Framework Utils
15 ##########################################################
18 ${CMAKE_SOURCE_DIR}/utils/MsgDebug.cpp
19 ${CMAKE_SOURCE_DIR}/utils/MsgException.cpp
20 ${CMAKE_SOURCE_DIR}/utils/MsgUtilFunction.cpp
21 ${CMAKE_SOURCE_DIR}/utils/MsgTextConvert.cpp
22 ${CMAKE_SOURCE_DIR}/utils/MsgIpcSocket.cpp
23 ${CMAKE_SOURCE_DIR}/utils/MsgUtilFile.cpp
24 ${CMAKE_SOURCE_DIR}/utils/MsgSqliteWrapper.cpp
25 ${CMAKE_SOURCE_DIR}/utils/MsgUtilStorage.cpp
26 ${CMAKE_SOURCE_DIR}/utils/MsgGconfWrapper.cpp
27 ${CMAKE_SOURCE_DIR}/utils/MsgContact.cpp
28 ${CMAKE_SOURCE_DIR}/utils/MsgVMessage.cpp
29 ${CMAKE_SOURCE_DIR}/utils/MsgMemory.cpp
30 ${CMAKE_SOURCE_DIR}/utils/MsgMmsMessage.cpp
31 ${CMAKE_SOURCE_DIR}/utils/MsgDrmWrapper.cpp
32 ${CMAKE_SOURCE_DIR}/utils/MsgJsonParser.cpp
33 ${CMAKE_SOURCE_DIR}/utils/MsgSerialize.cpp
34 ${CMAKE_SOURCE_DIR}/utils/MsgSmil.cpp
35 ${CMAKE_SOURCE_DIR}/utils/MsgZoneManager.cpp
39 ${CMAKE_SOURCE_DIR}/include/mapi
40 ${CMAKE_SOURCE_DIR}/include/common
41 ${CMAKE_SOURCE_DIR}/include/framework
42 ${CMAKE_SOURCE_DIR}/include/utils
43 ${CMAKE_SOURCE_DIR}/vobject-engine/include
46 INCLUDE(FindPkgConfig)
48 SET(PKG_MODULES glib-2.0 vconf db-util contacts-service2 dlog libxml-2.0 storage json-glib-1.0 capi-system-info)
49 IF(_FEATURE_CONTAINER_ENABLE)
50 ADD_DEFINITIONS("-DFEATURE_CONTAINER_ENABLE")
51 SET(PKG_MODULES ${PKG_MODULES} vasum)
52 ENDIF(_FEATURE_CONTAINER_ENABLE)
53 pkg_check_modules(utils_pkgs REQUIRED ${PKG_MODULES})
55 FOREACH(flag ${utils_pkgs_CFLAGS})
56 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
59 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
60 ADD_DEFINITIONS("-DFEATURE_JAVA_MMS")
62 SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
64 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
66 ADD_LIBRARY(${UTILS-LIB} SHARED ${UTILS-SRCS})
67 TARGET_LINK_LIBRARIES(${UTILS-LIB} ${utils_pkgs_LDFLAGS} rt ${VOBJECT-LIB})
69 INSTALL(TARGETS ${UTILS-LIB} DESTINATION lib COMPONENT RuntimeLibraries)