3.0 migration
[platform/core/messaging/msg-service.git] / proxy / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 PROJECT(msg-server CXX)
3
4 SET(CMAKE_SKIP_BUILD_RPATH TRUE)
5
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}")
10
11 SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -O0 -g -Wall")
12
13 ##########################################################
14 # Define Transaction Proxy
15 ##########################################################
16
17 SET(TRANS-PROXY-SRCS
18         ${CMAKE_SOURCE_DIR}/proxy/MsgProxyListener.cpp
19         ${CMAKE_SOURCE_DIR}/proxy/MsgHandleControl.cpp
20         ${CMAKE_SOURCE_DIR}/proxy/MsgHandleSetting.cpp
21         ${CMAKE_SOURCE_DIR}/proxy/MsgHandleStorage.cpp
22         ${CMAKE_SOURCE_DIR}/proxy/MsgHandleTransport.cpp
23         ${CMAKE_SOURCE_DIR}/proxy/MsgHandleFilter.cpp
24 )
25
26 INCLUDE_DIRECTORIES(
27     ${CMAKE_SOURCE_DIR}/include/mapi
28         ${CMAKE_SOURCE_DIR}/include/common
29         ${CMAKE_SOURCE_DIR}/include/utils
30         ${CMAKE_SOURCE_DIR}/include/proxy
31 )
32
33 INCLUDE(FindPkgConfig)
34 pkg_check_modules(trans_proxy_pkgs REQUIRED glib-2.0 dlog vconf security-server db-util)
35
36 FOREACH(flag ${trans_proxy_pkgs_CFLAGS})
37         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
38 ENDFOREACH(flag)
39
40 SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
41
42 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
43
44 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
45
46 ADD_LIBRARY(${TRANS-PROXY-LIB} SHARED ${TRANS-PROXY-SRCS})
47 TARGET_LINK_LIBRARIES(${TRANS-PROXY-LIB} ${trans_proxy_pkgs_LDFLAGS} ${UTILS-LIB})
48
49 INSTALL(TARGETS ${TRANS-PROXY-LIB} DESTINATION ${LIBDIR} COMPONENT RuntimeLibraries)
50