1 #Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 # @file CMakeLists.txt
16 # @author Jan Olszak (j.olszak@samsung.com)
17 # @author Rafal Krypa (r.krypa@samsung.com)
18 # @author Lukasz Wojciechowski (l.wojciechow@partner.samsung.com)
22 INCLUDE(FindPkgConfig)
24 SET(HELLO_TIZEN_TEST "hello-tizen")
25 SET(HELLO_TIZEN_TEST_SOURCES
26 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/hello-tizen.cpp
28 ADD_EXECUTABLE( ${HELLO_TIZEN_TEST} ${HELLO_TIZEN_TEST_SOURCES} )
29 INSTALL(TARGETS ${HELLO_TIZEN_TEST}
31 PERMISSIONS OWNER_READ
41 SET(LPC_TARGET_TEST "libprivilege-control-test")
44 PKG_CHECK_MODULES(LPC_TARGET_DEP
54 SET(LPC_TARGET_TEST_SOURCES
55 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/common/db_sqlite.cpp
56 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/common/db.cpp
57 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/common/duplicates.cpp
58 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/libprivilege-control-test.cpp
59 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/test_cases.cpp
60 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/test_cases_nosmack.cpp
61 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/test_cases_incorrect_params.cpp
62 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/test_cases_stress.cpp
63 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/libprivilege-control_test_common.cpp
67 INCLUDE_DIRECTORIES(SYSTEM
68 ${LPC_TARGET_DEP_INCLUDE_DIRS}
72 ${PROJECT_SOURCE_DIR}/tests/common/
73 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/common/
76 #preprocessor definitions
77 #ADD_DEFINITIONS("-DDPL_LOGS_ENABLED")
80 ADD_EXECUTABLE(${LPC_TARGET_TEST} ${LPC_TARGET_TEST_SOURCES})
83 TARGET_LINK_LIBRARIES(${LPC_TARGET_TEST}
84 ${LPC_TARGET_DEP_LIBRARIES}
89 #place for output file
90 INSTALL(TARGETS ${LPC_TARGET_TEST}
92 PERMISSIONS OWNER_READ
103 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/WRT_test_privilege_control_rules1.smack
104 DESTINATION /usr/share/privilege-control/
108 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/WRT_test_privilege_control_rules2.smack
109 DESTINATION /usr/share/privilege-control/
113 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/WRT_test_privilege_control_rules2_no_r.smack
114 DESTINATION /usr/share/privilege-control/
118 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/WRT_test_privilege_control_rules2_r.smack
119 DESTINATION /usr/share/privilege-control/
123 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/test_privilege_control_DIR
124 DESTINATION /etc/smack/
128 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/TestMisiuPysiu123.wgt
129 DESTINATION /usr/bin/
133 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/uqNfgEjqc7-1.0.0-arm.tpk
134 DESTINATION /usr/bin/
138 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/WRT_test_privilege_control_rules_wgt.smack
139 DESTINATION /usr/share/privilege-control/
143 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/WRT_test_privilege_control_rules_wgt.dac
144 DESTINATION /usr/share/privilege-control/
148 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/OSP_test_privilege_control_rules_osp.smack
149 DESTINATION /usr/share/privilege-control/
153 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/OSP_test_privilege_control_rules_osp.dac
154 DESTINATION /usr/share/privilege-control/
159 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/EFL_test_privilege_control_rules_efl.smack
160 DESTINATION /usr/share/privilege-control/
164 ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/EFL_test_privilege_control_rules_efl.dac
165 DESTINATION /usr/share/privilege-control/