9c962759c71c1eadc667006e8ac2c913aebde623
[platform/core/security/cert-svc.git] / tests / capi / CMakeLists.txt
1 # Copyright (c) 2011 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
21 SET(VCOREC_TESTS_SOURCES
22     ${PROJECT_SOURCE_DIR}/tests/capi/api_tests.cpp
23     ${PROJECT_SOURCE_DIR}/tests/capi/test_suite_01.cpp
24     )
25
26 INCLUDE_DIRECTORIES(
27     ${PROJECT_SOURCE_DIR}/vcore/src
28     ${PROJECT_SOURCE_DIR}/tests/capi
29     ${PROJECT_SOURCE_DIR}/include
30     )
31
32 ADD_EXECUTABLE(${TARGET_VCOREC_TEST} ${VCOREC_TESTS_SOURCES})
33
34 TARGET_LINK_LIBRARIES(${TARGET_VCOREC_TEST}
35     ${TARGET_VCORE_LIB}
36     ${TARGET_CERT_SVC_LIB}
37     ${VCORE_TEST_DEP_LIBRARIES}
38     -ldl
39     )
40
41 INSTALL(TARGETS ${TARGET_VCOREC_TEST}
42     DESTINATION ${TZ_SYS_BIN}
43     PERMISSIONS OWNER_READ
44                 OWNER_WRITE
45                 OWNER_EXECUTE
46                 GROUP_READ
47                 GROUP_EXECUTE
48                 WORLD_READ
49                 WORLD_EXECUTE
50     )
51
52 INSTALL(FILES
53     ${PROJECT_SOURCE_DIR}/tests/capi/data/cert_a.pem
54     ${PROJECT_SOURCE_DIR}/tests/capi/data/cert_b.pem
55     ${PROJECT_SOURCE_DIR}/tests/capi/data/pkey.pem
56     DESTINATION ${TZ_SYS_SHARE}/cert-svc/pkcs12/test1st
57     PERMISSIONS OWNER_READ
58                 GROUP_READ
59                 WORLD_READ
60     )
61
62 INSTALL(FILES
63     ${PROJECT_SOURCE_DIR}/tests/capi/data/cert0.pem
64     ${PROJECT_SOURCE_DIR}/tests/capi/data/cert1.der
65     ${PROJECT_SOURCE_DIR}/tests/capi/data/cert2fake.pem
66     ${PROJECT_SOURCE_DIR}/tests/capi/data/cert3fake.der
67     DESTINATION ${TZ_SYS_SHARE}/cert-svc/cert-type/
68     PERMISSIONS OWNER_READ
69                 GROUP_READ
70                 WORLD_READ
71     )
72