Change NULL to nullptr
[platform/core/test/security-tests.git] / tests / security-manager-tests / CMakeLists.txt
1 #
2 #Copyright (c) 2014 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
33
34 SET(TARGET_SEC_MGR_TESTS "security-manager-tests")
35
36 SET(SEC_MGR_SOURCES
37     ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/security_manager_tests.cpp
38     ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/common/sm_db.cpp
39     ${PROJECT_SOURCE_DIR}/tests/cynara-tests/common/cynara_test_client.cpp
40     ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/libprivilege-control_test_common.cpp
41    )
42
43 INCLUDE_DIRECTORIES(SYSTEM
44     ${SEC_MGR_TESTS_DEP_INCLUDE_DIRS}
45    )
46
47 INCLUDE_DIRECTORIES(SYSTEM
48     ${CYNARA_TARGET_DEP_INCLUDE_DIRS}
49     )
50
51 INCLUDE_DIRECTORIES(
52     ${PROJECT_SOURCE_DIR}/tests/common/
53     ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/common/
54     ${PROJECT_SOURCE_DIR}/tests/cynara-tests/common/
55     ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/common/
56    )
57
58 ADD_EXECUTABLE(${TARGET_SEC_MGR_TESTS} ${SEC_MGR_SOURCES})
59
60 TARGET_LINK_LIBRARIES(${TARGET_SEC_MGR_TESTS}
61     ${SEC_MGR_TESTS_DEP_LIBRARIES}
62     dpl-test-framework
63     tests-common
64     )
65
66 INSTALL(TARGETS ${TARGET_SEC_MGR_TESTS} DESTINATION /usr/bin)
67
68 INSTALL(DIRECTORY
69     ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/test_DIR
70     DESTINATION /etc/smack/
71 )
72
73 INSTALL(DIRECTORY
74     ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/test_DIR
75     DESTINATION /home/app/securitytests/
76 )