# #Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # @file CMakeLists.txt # @author Marcin Niesluchowski (m.niesluchow@samsung.com) # @brief # INCLUDE(FindPkgConfig) # Dependencies PKG_CHECK_MODULES(SEC_MGR_TESTS_DEP REQUIRED libsmack libprivilege-control security-manager libtzplatform-config sqlite3) SET(TARGET_SEC_MGR_TESTS "security-manager-tests") SET(SEC_MGR_SOURCES ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/security_manager_tests.cpp ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/common/sm_db.cpp ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/libprivilege-control_test_common.cpp ) INCLUDE_DIRECTORIES(SYSTEM ${SEC_MGR_TESTS_DEP_INCLUDE_DIRS} ) INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/tests/common/ ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/common/ ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/common/ ) ADD_EXECUTABLE(${TARGET_SEC_MGR_TESTS} ${SEC_MGR_SOURCES}) TARGET_LINK_LIBRARIES(${TARGET_SEC_MGR_TESTS} ${SEC_MGR_TESTS_DEP_LIBRARIES} dpl-test-framework tests-common ) INSTALL(TARGETS ${TARGET_SEC_MGR_TESTS} DESTINATION /usr/bin) INSTALL(FILES ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/WRT_security_manager_test_rules1.smack DESTINATION /usr/share/privilege-control/ ) INSTALL(FILES ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/WRT_security_manager_test_rules2.smack DESTINATION /usr/share/privilege-control/ ) INSTALL(FILES ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/WRT_security_manager_test_rules2_no_r.smack DESTINATION /usr/share/privilege-control/ ) INSTALL(FILES ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/WRT_security_manager_test_rules2_r.smack DESTINATION /usr/share/privilege-control/ ) INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/test_DIR DESTINATION /etc/smack/ ) INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/tests/security-manager-tests/test_DIR DESTINATION /home/app/securitytests/ )