Merging tizen into ckm. Stage 1.
[platform/core/test/security-tests.git] / tests / libsmack-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      Pawel Polawski (p.polawski@samsung.com)
17 # @version     0.1
18 # @brief
19 #
20 INCLUDE(FindPkgConfig)
21 SET(TARGET_TEST "libsmack-test")
22
23 #dependencies
24 PKG_CHECK_MODULES(TARGET_DEP
25     libsmack
26     REQUIRED
27     )
28
29 #files to compile
30 SET(TARGET_TEST_SOURCES
31     ${PROJECT_SOURCE_DIR}/tests/libsmack-tests/libsmack-test.cpp
32     ${PROJECT_SOURCE_DIR}/tests/libsmack-tests/test_cases.cpp
33     )
34
35 #header directories
36 INCLUDE_DIRECTORIES(SYSTEM
37     ${TARGET_DEP_INCLUDE_DIRS}
38     )
39
40 INCLUDE_DIRECTORIES(
41     ${PROJECT_SOURCE_DIR}/tests/common/
42     )
43
44 #preprocessor definitions
45 #ADD_DEFINITIONS("-DDPL_LOGS_ENABLED")
46
47 #output format
48 ADD_EXECUTABLE(${TARGET_TEST} ${TARGET_TEST_SOURCES})
49
50 #linker directories
51 TARGET_LINK_LIBRARIES(${TARGET_TEST}
52     ${TARGET_DEP_LIBRARIES}
53     dpl-test-framework
54     tests-common
55     )
56
57 #place for output file
58 INSTALL(TARGETS ${TARGET_TEST}
59     DESTINATION /usr/bin
60     PERMISSIONS OWNER_READ
61                 OWNER_WRITE
62                 OWNER_EXECUTE
63                 GROUP_READ
64                 GROUP_EXECUTE
65                 WORLD_READ
66                 WORLD_EXECUTE
67     )
68
69 #place for additional files
70 INSTALL(FILES
71     ${PROJECT_SOURCE_DIR}/tests/libsmack-tests/test_smack_rules
72     DESTINATION /etc/smack
73     PERMISSIONS
74     OWNER_READ
75     OWNER_EXECUTE
76     GROUP_READ
77     GROUP_EXECUTE
78     WORLD_READ
79     WORLD_EXECUTE
80   )
81
82 #place for full rules
83 INSTALL(FILES
84     ${PROJECT_SOURCE_DIR}/tests/libsmack-tests/test_smack_rules_full
85     DESTINATION /etc/smack
86     PERMISSIONS
87     OWNER_READ
88     GROUP_READ
89     WORLD_READ
90   )
91
92 #place for rules2
93 INSTALL(FILES
94     ${PROJECT_SOURCE_DIR}/tests/libsmack-tests/test_smack_rules2
95     DESTINATION /etc/smack
96     PERMISSIONS
97     OWNER_READ
98     GROUP_READ
99     WORLD_READ
100   )
101
102 #place for rules3
103 INSTALL(FILES
104     ${PROJECT_SOURCE_DIR}/tests/libsmack-tests/test_smack_rules3
105     DESTINATION /etc/smack
106     PERMISSIONS
107     OWNER_READ
108     GROUP_READ
109     WORLD_READ
110   )
111
112 #place for rules4
113 INSTALL(FILES
114     ${PROJECT_SOURCE_DIR}/tests/libsmack-tests/test_smack_rules4
115     DESTINATION /etc/smack
116     PERMISSIONS
117     OWNER_READ
118     GROUP_READ
119     WORLD_READ
120   )