2 #Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
16 # @file CMakeLists.txt
17 # @author Tomasz Swierczek (t.swierczek@samsung.com)
18 # @author Mariusz Domanski (m.domanski@samsung.com)
22 INCLUDE(FindPkgConfig)
25 PKG_CHECK_MODULES(SEC_SRV_TESTS_DEP
37 SET(TARGET_SEC_SRV_CLIENT_SMACK_TESTS "security-server-tests-client-smack")
38 SET(TARGET_SEC_SRV_TC_SERVER_TESTS "security-server-tests-server")
39 SET(TARGET_SEC_SRV_PWD_TESTS "security-server-tests-password")
40 SET(TARGET_SEC_SRV_MT_TESTS "security-server-tests-mt")
41 SET(TARGET_SEC_SRV_DBUS_TESTS "security-server-tests-dbus")
42 SET(TARGET_SEC_SRV_MEASURER "security-server-tests-api-speed")
47 SET(SEC_SRV_CLIENT_SMACK_SOURCES
48 ${PROJECT_SOURCE_DIR}/tests/security-server-tests/security_server_tests_client_smack.cpp
49 ${PROJECT_SOURCE_DIR}/tests/security-server-tests/security_server_mockup.cpp
52 SET(SEC_SRV_TC_SERVER_SOURCES
53 ${PROJECT_SOURCE_DIR}/tests/security-server-tests/security_server_tests_server.cpp
54 ${PROJECT_SOURCE_DIR}/tests/security-server-tests/security_server_tests_weird_arguments.cpp
55 ${PROJECT_SOURCE_DIR}/tests/security-server-tests/common/security_server_tests_common.cpp
58 SET(SEC_SRV_PWD_SOURCES
59 ${PROJECT_SOURCE_DIR}/tests/security-server-tests/security_server_tests_password.cpp
60 ${PROJECT_SOURCE_DIR}/tests/security-server-tests/security_server_clean_env.cpp
63 SET(SEC_SRV_MT_SOURCES
64 ${PROJECT_SOURCE_DIR}/tests/security-server-tests/security_server_tests_mt.cpp
67 SET(SEC_SRV_DBUS_SOURCES
68 ${PROJECT_SOURCE_DIR}/tests/security-server-tests/security_server_tests_dbus.cpp
70 SET(SEC_SRV_MEASURER_SOURCES
71 ${PROJECT_SOURCE_DIR}/tests/security-server-tests/security_server_measurer_API_speed.cpp
72 ${PROJECT_SOURCE_DIR}/tests/security-server-tests/security_server_mockup.cpp
75 INCLUDE_DIRECTORIES(SYSTEM
76 ${SEC_SRV_TESTS_DEP_INCLUDE_DIRS}
80 ${PROJECT_SOURCE_DIR}/tests/common/
81 ${PROJECT_SOURCE_DIR}/tests/security-server-tests/common/
84 ADD_DEFINITIONS("-I/usr/include/dbus-1.0/dbus")
86 #LINK_DIRECTORIES(${SEC_SRV_PKGS_LIBRARY_DIRS})
88 ADD_EXECUTABLE(${TARGET_SEC_SRV_CLIENT_SMACK_TESTS} ${SEC_SRV_CLIENT_SMACK_SOURCES})
89 ADD_EXECUTABLE(${TARGET_SEC_SRV_TC_SERVER_TESTS} ${SEC_SRV_TC_SERVER_SOURCES})
90 ADD_EXECUTABLE(${TARGET_SEC_SRV_PWD_TESTS} ${SEC_SRV_PWD_SOURCES})
91 ADD_EXECUTABLE(${TARGET_SEC_SRV_MT_TESTS} ${SEC_SRV_MT_SOURCES})
92 ADD_EXECUTABLE(${TARGET_SEC_SRV_DBUS_TESTS} ${SEC_SRV_DBUS_SOURCES})
93 ADD_EXECUTABLE(${TARGET_SEC_SRV_MEASURER} ${SEC_SRV_MEASURER_SOURCES})
96 TARGET_LINK_LIBRARIES(${TARGET_SEC_SRV_CLIENT_SMACK_TESTS}
97 ${SEC_SRV_TESTS_DEP_LIBRARIES}
100 TARGET_LINK_LIBRARIES(${TARGET_SEC_SRV_TC_SERVER_TESTS}
101 ${SEC_SRV_TESTS_DEP_LIBRARIES}
104 TARGET_LINK_LIBRARIES(${TARGET_SEC_SRV_PWD_TESTS}
105 ${SEC_SRV_TESTS_DEP_LIBRARIES}
108 TARGET_LINK_LIBRARIES(${TARGET_SEC_SRV_MT_TESTS}
109 ${SEC_SRV_TESTS_DEP_LIBRARIES}
112 TARGET_LINK_LIBRARIES(${TARGET_SEC_SRV_DBUS_TESTS}
113 ${SEC_SRV_TESTS_DEP_LIBRARIES}
116 TARGET_LINK_LIBRARIES(${TARGET_SEC_SRV_MEASURER}
117 ${SEC_SRV_TESTS_DEP_LIBRARIES}
122 INSTALL(TARGETS ${TARGET_SEC_SRV_CLIENT_SMACK_TESTS} DESTINATION /usr/bin)
123 INSTALL(TARGETS ${TARGET_SEC_SRV_TC_SERVER_TESTS} DESTINATION /usr/bin)
124 INSTALL(TARGETS ${TARGET_SEC_SRV_PWD_TESTS} DESTINATION /usr/bin)
125 INSTALL(TARGETS ${TARGET_SEC_SRV_MT_TESTS} DESTINATION /usr/bin)
126 INSTALL(TARGETS ${TARGET_SEC_SRV_DBUS_TESTS} DESTINATION /usr/bin)
127 INSTALL(TARGETS ${TARGET_SEC_SRV_MEASURER} DESTINATION /usr/bin)