1 LINK_DIRECTORIES(${CMAKE_BINARY_DIR})
2 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/provider/include)
3 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/provider-interface/include)
4 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/agent/include)
6 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
7 PROJECT(gtest-download-provider C CXX)
9 SET(GTEST_TEST "gtest-download-provider")
10 ADD_DEFINITIONS("-DUSE_DLOG")
12 SET(REQUIRES_LIST ${REQUIRES_LIST}
17 capi-appfw-app-control
20 INCLUDE(FindPkgConfig)
21 PKG_CHECK_MODULES(GTEST_TEST_PKG REQUIRED ${REQUIRES_LIST})
23 FOREACH(flag ${GTEST_TEST_PKG_CFLAGS})
24 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
27 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall -fPIE")
28 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
29 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS}")
30 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
32 FILE(GLOB GTEST_TEST_SRCS *.cpp)
33 SET(GTEST_TEST_SRCS ${GTEST_TEST_SRCS})
35 ADD_EXECUTABLE(${GTEST_TEST} ${GTEST_TEST_SRCS})
36 TARGET_LINK_LIBRARIES(${GTEST_TEST} downloadagent2 download-provider-interface ${GTEST_TEST_LDFLAGS} ${GTEST_TEST_PKG_LDFLAGS} dl)
38 INSTALL(TARGETS ${GTEST_TEST} RUNTIME DESTINATION ${BIN_INSTALL_DIR})