Remove Tapi dependendy
[platform/core/connectivity/data-router.git] / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 PROJECT(data-router C)
3
4 SET(SRCS src/dr-main.c
5 src/dr-modem.c
6 src/dr-usb.c
7 src/dr-noti-handler.c
8 src/dr-util.c
9 src/dr-common.c
10 src/dr-parser.c
11 src/dr-ipc.c
12 )
13
14
15 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
16 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
17
18 INCLUDE(FindPkgConfig)
19 pkg_check_modules(pkgs REQUIRED glib-2.0
20                                 dbus-glib-1
21                                 dlog vconf
22                                 )
23
24 FOREACH(flag ${pkgs_CFLAGS})
25         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
26 ENDFOREACH(flag)
27 #SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -finstrument-functions")
28 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -pthread")
29
30 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
31 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
32 SET(BINDIR "/usr/bin")
33 SET(EXEC_PREFIX "\${prefix}")
34 SET(INCLUDEDIR "/usr/include")
35 SET(VERSION 1.0)
36
37 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
38 ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")
39 ADD_DEFINITIONS("-DTARGET")
40
41 ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
42 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
43
44 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})