eb3ed39b32ff7384c248329f0c8f36fbc3e1a7fb
[platform/core/test/security-tests.git] / tests / security-manager-tests / CMakeLists.txt
1 #
2 #Copyright (c) 2014-2015 Samsung Electronics Co., Ltd All Rights Reserved
3 #
4 #   Licensed under the Apache License, Version 2.0 (the "License");
5 #   you may not use this file except in compliance with the License.
6 #   You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #   Unless required by applicable law or agreed to in writing, software
11 #   distributed under the License is distributed on an "AS IS" BASIS,
12 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #   See the License for the specific language governing permissions and
14 #   limitations under the License.
15 #
16 # @file        CMakeLists.txt
17 # @author      Marcin Niesluchowski (m.niesluchow@samsung.com)
18 # @brief
19 #
20
21 INCLUDE(FindPkgConfig)
22
23 # Dependencies
24 PKG_CHECK_MODULES(SEC_MGR_TESTS_DEP
25     REQUIRED
26     libsmack
27     libprivilege-control
28     cynara-client
29     security-manager
30     libtzplatform-config
31     sqlite3
32     libcap
33     dbus-1
34     libgum)
35
36
37 SET(TARGET_SEC_MGR_TESTS "security-manager-tests")
38
39 SET(SEC_MGR_SOURCES
40     ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/security_manager_tests.cpp
41     ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/common/sm_api.cpp
42     ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/common/sm_db.cpp
43     ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/common/sm_request.cpp
44     ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/common/sm_user_request.cpp
45     ${PROJECT_SOURCE_DIR}/tests/cynara-tests/common/cynara_test_client.cpp
46     ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/libprivilege-control_test_common.cpp
47    )
48
49 INCLUDE_DIRECTORIES(SYSTEM
50     ${SEC_MGR_TESTS_DEP_INCLUDE_DIRS}
51    )
52
53 INCLUDE_DIRECTORIES(SYSTEM
54     ${CYNARA_TARGET_DEP_INCLUDE_DIRS}
55     )
56
57 INCLUDE_DIRECTORIES(
58     ${PROJECT_SOURCE_DIR}/tests/common/
59     ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/common/
60     ${PROJECT_SOURCE_DIR}/tests/cynara-tests/common/
61     ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/common/
62    )
63
64 ADD_EXECUTABLE(${TARGET_SEC_MGR_TESTS} ${SEC_MGR_SOURCES})
65
66 TARGET_LINK_LIBRARIES(${TARGET_SEC_MGR_TESTS}
67     ${SEC_MGR_TESTS_DEP_LIBRARIES}
68     dpl-test-framework
69     tests-common
70     )
71
72 INSTALL(TARGETS ${TARGET_SEC_MGR_TESTS} DESTINATION /usr/bin)
73
74 INSTALL(DIRECTORY
75     ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/test_DIR
76     DESTINATION /usr/apps/
77 )