Added additional test cases for stc-manager firewall dbus methods
[platform/core/connectivity/stc-manager.git] / unittest / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 PROJECT(gtest-stc-manager C CXX)
3
4 SET(GTEST_TEST "gtest-stc-manager")
5 ADD_DEFINITIONS("-DUSE_DLOG")
6
7 SET(REQUIRES_LIST ${REQUIRES_LIST}
8         glib-2.0
9         gio-2.0
10         gmock
11         dlog
12 )
13 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
14 INCLUDE(FindPkgConfig)
15 PKG_CHECK_MODULES(GTEST_TEST_PKG REQUIRED ${REQUIRES_LIST})
16
17 FOREACH(flag ${GTEST_TEST_PKG_CFLAGS})
18         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
19 ENDFOREACH(flag)
20
21 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall -fPIE")
22 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
23 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS}")
24 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
25
26 FILE(GLOB GTEST_TEST_SRCS *.cpp)
27 SET(GTEST_TEST_SRCS ${GTEST_TEST_SRCS})
28
29 ADD_EXECUTABLE(${GTEST_TEST} ${GTEST_TEST_SRCS})
30 TARGET_LINK_LIBRARIES(${GTEST_TEST} ${GTEST_TEST_LDFLAGS} ${GTEST_TEST_PKG_LDFLAGS} -ldl -lgcov)
31
32 INSTALL(TARGETS ${GTEST_TEST} RUNTIME DESTINATION ${BIN_DIR})