7456e3ae07ae13bf4d2ad24d7ddcd34dbd8a2c53
[platform/core/security/device-certificate-manager.git] / tests / 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        tests/CMakeLists.txt
16 # @author      Dariusz Michaluk <d.michaluk@samsung.com>
17 # @author      Jaroslaw Pelczar <j.pelczar@samsung.com>
18
19 FIND_PACKAGE(Boost REQUIRED
20         COMPONENTS
21         unit_test_framework)
22
23 INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIRS})
24 LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
25 INCLUDE_DIRECTORIES(../src/dcm-client)
26
27 ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
28 ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK)
29
30 SET(TARGET_TESTS "device-certificate-manager-tests")
31 ADD_EXECUTABLE(${TARGET_TESTS}
32         device_certificate_manager_tests.cpp
33         api_test.cpp)
34
35 TARGET_LINK_LIBRARIES(${TARGET_TESTS}
36         ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES}
37         device-certificate-manager)
38
39 INSTALL(TARGETS
40         ${TARGET_TESTS}
41         RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})