e212862fcc338ecb95379a03207f1711e6749b64
[platform/core/test/security-tests.git] / src / ckm / privileged / CMakeLists.txt
1 # Copyright (c) 2013-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 # @brief
18 #
19 PKG_CHECK_MODULES(CKM_DEP
20     REQUIRED
21     libsmack
22     dbus-1
23 )
24
25 OPTION("TZ_BACKEND" OFF)
26 IF(TZ_BACKEND)
27     ADD_DEFINITIONS("-DTZ_BACKEND")
28 ENDIF(TZ_BACKEND)
29
30 SET(CKM_SOURCES
31     access_provider2.cpp
32     async-api.cpp
33     capi-access_control.cpp
34     ckm-privileged-common.cpp
35     initial-values.cpp
36     main.cpp
37     system-db.cpp
38 )
39
40 INCLUDE_DIRECTORIES(SYSTEM ${CKM_DEP_INCLUDE_DIRS})
41 INCLUDE_DIRECTORIES(
42     ${PROJECT_SOURCE_DIR}/src/common
43     ..
44     .
45 )
46
47 ADD_EXECUTABLE(${TARGET_CKM_PRIVILEGED_TESTS} ${CKM_SOURCES})
48
49 TARGET_LINK_LIBRARIES(${TARGET_CKM_PRIVILEGED_TESTS}
50     ${TARGET_CKM_TEST_COMMON}
51     ${CKM_DEP_LIBRARIES}
52     ${COMMON_TARGET_TEST}
53 )
54
55 INSTALL(TARGETS ${TARGET_CKM_PRIVILEGED_TESTS} DESTINATION bin)
56 INSTALL(FILES ckm-tests-on-onlycap.sh
57     DESTINATION bin
58     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
59                 GROUP_READ GROUP_EXECUTE
60                 WORLD_READ WORLD_EXECUTE
61 )