27f72fbb4f0e5defa8a45d2e521d108e61ce3e50
[platform/core/api/radio.git] / test / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 SET(fw_test "${fw_name}-test")
3
4 INCLUDE_DIRECTORIES(../include)
5 link_directories(${CMAKE_SOURCE_DIR}/../)
6 SET(dependents "glib-2.0")
7
8 INCLUDE(FindPkgConfig)
9 pkg_check_modules(${fw_test} REQUIRED mm-radio)
10 FOREACH(flag ${${fw_test}_CFLAGS})
11     SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
12 ENDFOREACH(flag)
13
14 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -pie")
15
16 aux_source_directory(. sources)
17 FOREACH(src ${sources})
18     GET_FILENAME_COMPONENT(src_name ${src} NAME_WE)
19     MESSAGE("${src_name}")
20     ADD_EXECUTABLE(${src_name} ${src})
21     TARGET_LINK_LIBRARIES(${src_name} capi-media-radio ${${fw_test}_LDFLAGS})
22 ENDFOREACH()
23