Merge "Add support for ipv6" into tizen
[platform/core/api/connection.git] / test / CMakeLists.txt
1 SET(fw_test "${fw_name}-test")
2
3 SET(dependents "capi-base-common glib-2.0 network")
4
5 INCLUDE(FindPkgConfig)
6 pkg_check_modules(${fw_test} REQUIRED ${dependents})
7 FOREACH(flag ${${fw_test}_CFLAGS})
8     SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
9 ENDFOREACH(flag)
10
11 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall")
12
13 aux_source_directory(. sources)
14 FOREACH(src ${sources})
15     GET_FILENAME_COMPONENT(src_name ${src} NAME_WE)
16     MESSAGE("${src_name}")
17     ADD_EXECUTABLE(${src_name} ${src})
18     TARGET_LINK_LIBRARIES(${src_name} ${fw_name} ${${fw_test}_LDFLAGS})
19 ENDFOREACH()
20
21 INSTALL(TARGETS connection_test RUNTIME DESTINATION bin/)