Fix & Refactor internal unit tests
[platform/core/security/cert-svc.git] / tests / capi / CMakeLists.txt
1 # Copyright (c) 2015 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 # @author      Bartlomiej Grzelewski (b.grzelewski@samsung.com)
17 # @version     1.0
18 # @brief
19 #
20 SET(CERT_SVC_CAPI_TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR})
21
22 SET(CERT_SVC_CAPI_TESTS_SRCS
23     ${CERT_SVC_CAPI_TESTS_DIR}/main.cpp
24     ${CERT_SVC_CAPI_TESTS_DIR}/common-res.cpp
25     ${CERT_SVC_CAPI_TESTS_DIR}/test-certificate.cpp
26     ${CERT_SVC_CAPI_TESTS_DIR}/test-primitive.cpp
27     )
28
29 INCLUDE_DIRECTORIES(
30     ${CERT_SVC_CAPI_TESTS_DIR}
31     ${PROJECT_SOURCE_DIR}/vcore/src
32     ${PROJECT_SOURCE_DIR}/include
33     )
34
35 ADD_EXECUTABLE(${TARGET_CAPI_TEST}
36     ${CERT_SVC_CAPI_TESTS_SRCS}
37     ${DPL_TEST_SOURCES}
38     )
39
40 TARGET_LINK_LIBRARIES(${TARGET_CAPI_TEST}
41     ${TARGET_VCORE_LIB}
42     ${TEST_DEP_LIBRARIES}
43     )
44
45 INSTALL(TARGETS ${TARGET_CAPI_TEST}
46     DESTINATION ${TZ_SYS_BIN}
47     PERMISSIONS OWNER_READ
48                 OWNER_WRITE
49                 OWNER_EXECUTE
50                 GROUP_READ
51                 GROUP_EXECUTE
52                 WORLD_READ
53                 WORLD_EXECUTE
54     )
55
56 INSTALL(FILES
57     ${CERT_SVC_CAPI_TESTS_DIR}/data/root_cacert0.pem
58     DESTINATION ${TZ_SYS_RO_APP}/cert-svc-tests/certs
59     PERMISSIONS OWNER_READ
60                 GROUP_READ
61                 WORLD_READ
62     )