Fix & Refactor internal unit tests
[platform/core/security/cert-svc.git] / tests / vcore / 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      Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
17 # @author      Pawel Sikorski (p.sikorski@samsung.com)
18 # @author      Bartlomiej Grzelewski (b.grzelewski@samsung.com)
19 # @author      Kyungwook Tak (k.tak@samsung.com)
20 # @version     1.0
21 # @brief
22 #
23 SET(VCORE_TESTS_SOURCES
24     main.cpp
25     test-common.cpp
26     test-signature-validator.cpp
27     test-certificate.cpp
28     test-ocsp-check.cpp
29     test-time-conversion.cpp
30     )
31
32 INCLUDE_DIRECTORIES(
33     .
34     )
35
36 ADD_EXECUTABLE(${TARGET_VCORE_TEST}
37     ${VCORE_TESTS_SOURCES}
38     ${DPL_TEST_SOURCES})
39
40 TARGET_LINK_LIBRARIES(${TARGET_VCORE_TEST}
41     ${TARGET_VCORE_LIB}
42     ${TEST_DEP_LIBRARIES}
43     )
44
45 INSTALL(TARGETS ${TARGET_VCORE_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     resource/root_cacert0.pem
58     DESTINATION
59     ${TZ_SYS_SHARE}/ca-certificates/tizen
60     )
61
62 INSTALL(
63     DIRECTORY
64         resource/wgt
65         resource/wgt_negative_hash
66         resource/wgt_negative_signature
67         resource/wgt_negative_certificate
68         resource/wgt_partner
69         resource/wgt_partner_operator
70         resource/tpk
71         resource/attacked-tpk
72         resource/tpk-with-userdata
73         resource/attacked-tpk-with-userdata
74
75     DESTINATION
76         ${TZ_SYS_RO_APP}/cert-svc-tests/apps
77     )