Modify, systematize and reorder tests related the following libprivilege-control...
[platform/core/test/security-tests.git] / tests / libprivilege-control-tests / CMakeLists.txt
1 #Copyright (c) 2012 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      Jan Olszak (j.olszak@samsung.com)
17 # @author      Rafal Krypa (r.krypa@samsung.com)
18 # @version     0.1
19 # @brief
20 #
21 INCLUDE(FindPkgConfig)
22 SET(LPC_TARGET_TEST "libprivilege-control-test")
23
24 #dependencies
25 PKG_CHECK_MODULES(LPC_TARGET_DEP
26     libsmack
27     libprivilege-control
28     dpl-test-efl
29     REQUIRED
30     )
31
32 #files to compile
33 SET(LPC_TARGET_TEST_SOURCES
34     ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/libprivilege-control-test.cpp
35     ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/test_cases.cpp
36     )
37
38 #header directories
39 INCLUDE_DIRECTORIES(
40     ${LPC_TARGET_DEP_INCLUDE_DIRS}
41     )
42
43 #preprocessor definitions
44 #ADD_DEFINITIONS("-DDPL_LOGS_ENABLED")
45
46 #output format
47 ADD_EXECUTABLE(${LPC_TARGET_TEST} ${LPC_TARGET_TEST_SOURCES})
48
49 #linker directories
50 TARGET_LINK_LIBRARIES(${LPC_TARGET_TEST}
51     ${LPC_TARGET_DEP_LIBRARIES}
52     )
53
54 #place for output file
55 INSTALL(TARGETS ${LPC_TARGET_TEST}
56     DESTINATION /usr/bin
57     PERMISSIONS OWNER_READ
58                 OWNER_WRITE
59                 OWNER_EXECUTE
60                 GROUP_READ
61                 GROUP_EXECUTE
62                 WORLD_READ
63                 WORLD_EXECUTE
64     )
65
66 # Test SMACK rules
67 INSTALL(FILES
68     ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/test_privilege_control_rules.smack
69     DESTINATION /usr/share/privilege-control/
70   )
71
72 INSTALL(FILES
73     ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/test_privilege_control_rules.dac
74     DESTINATION /usr/share/privilege-control/
75   )
76
77 INSTALL(DIRECTORY
78     ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/test_privilege_control_DIR
79     DESTINATION /etc/smack/
80 )