Apply gcov automation
[platform/core/api/wifi-aware.git] / tests / unittest / CMakeLists.txt
1 # Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
2 #
3 #    Licensed under the Apache License, Version 2.0 (the "License");
4 #    you may not use this file except in compliance with the License.
5 #    You may obtain a copy of the License at
6 #
7 #        http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #    Unless required by applicable law or agreed to in writing, software
10 #    distributed under the License is distributed on an "AS IS" BASIS,
11 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #    See the License for the specific language governing permissions and
13 #    limitations under the License.
14 #
15 # @file        CMakeLists.txt
16 #
17
18 SET(WIFI_AWARE_MOCK "wifi-aware-mock")
19 SET(TARGET_WIFI_AWARE_MOCK_INTERFACE "wifi-aware-mock-interface")
20
21 ADD_SUBDIRECTORY(mocks)
22
23 SET(WIFI_AWARE_UNITTEST "wifi-aware-unittest")
24 pkg_check_modules(TARGET_WIFI_AWARE_UNITTEST REQUIRED
25         capi-system-info
26         glib-2.0
27         gmock
28 )
29 INCLUDE_DIRECTORIES(
30         ${TARGET_WIFI_AWARE_UNITTEST_INCLUDE_DIRS}
31         ${CMAKE_SOURCE_DIR}/include
32         ${CMAKE_CURRENT_SOURCE_DIR}/mocks
33 )
34 LINK_DIRECTORIES(${TARGET_WIFI_AWARE_UNITTEST_LIBRARY_DIRS})
35
36 FILE(GLOB UNITTEST_SRCS *.cpp)
37
38 ADD_EXECUTABLE(${WIFI_AWARE_UNITTEST} ${UNITTEST_SRCS})
39 TARGET_LINK_LIBRARIES(${WIFI_AWARE_UNITTEST}
40         ${TARGET_WIFI_AWARE}
41         ${TARGET_WIFI_AWARE_MOCK_INTERFACE}
42         ${TARGET_WIFI_AWARE_UNITTEST_LIBRARIES}
43 )
44
45 INSTALL(TARGETS ${WIFI_AWARE_UNITTEST} DESTINATION bin/)