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 Transaction Proxy
15 ##########################################################
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
27 ${CMAKE_SOURCE_DIR}/include/mapi
28 ${CMAKE_SOURCE_DIR}/include/common
29 ${CMAKE_SOURCE_DIR}/include/utils
30 ${CMAKE_SOURCE_DIR}/include/proxy
33 INCLUDE(FindPkgConfig)
34 pkg_check_modules(trans_proxy_pkgs REQUIRED glib-2.0 dlog vconf security-server db-util)
36 FOREACH(flag ${trans_proxy_pkgs_CFLAGS})
37 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
40 SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
42 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
44 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
46 ADD_LIBRARY(${TRANS-PROXY-LIB} SHARED ${TRANS-PROXY-SRCS})
47 TARGET_LINK_LIBRARIES(${TRANS-PROXY-LIB} ${trans_proxy_pkgs_LDFLAGS} ${UTILS-LIB})
49 INSTALL(TARGETS ${TRANS-PROXY-LIB} DESTINATION ${LIBDIR} COMPONENT RuntimeLibraries)