1 # Copyright (c) 2014-2015 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.
16 cmake_minimum_required(VERSION 2.8.3)
18 INCLUDE(FindPkgConfig)
19 SET(CYNARA_TARGET_TEST "cynara-test")
21 PKG_CHECK_MODULES(CYNARA_TARGET_DEP
36 SET(CYNARA_TARGET_TEST_SOURCES
37 ${PROJECT_SOURCE_DIR}/src/cynara-tests/common/cynara_test_admin.cpp
38 ${PROJECT_SOURCE_DIR}/src/cynara-tests/common/cynara_test_agent.cpp
39 ${PROJECT_SOURCE_DIR}/src/cynara-tests/common/cynara_test_agent_request.cpp
40 ${PROJECT_SOURCE_DIR}/src/cynara-tests/common/cynara_test_agent_response.cpp
41 ${PROJECT_SOURCE_DIR}/src/cynara-tests/common/cynara_test_client.cpp
42 ${PROJECT_SOURCE_DIR}/src/cynara-tests/common/cynara_test_client_async_client.cpp
43 ${PROJECT_SOURCE_DIR}/src/cynara-tests/common/cynara_test_client_async_request_monitor.cpp
44 ${PROJECT_SOURCE_DIR}/src/cynara-tests/common/cynara_test_client_async_status_monitor.cpp
45 ${PROJECT_SOURCE_DIR}/src/cynara-tests/common/cynara_test_commons.cpp
46 ${PROJECT_SOURCE_DIR}/src/cynara-tests/common/cynara_test_cynara_mask.cpp
47 ${PROJECT_SOURCE_DIR}/src/cynara-tests/common/cynara_test_env.cpp
48 ${PROJECT_SOURCE_DIR}/src/cynara-tests/common/cynara_test_file_operations.cpp
49 ${PROJECT_SOURCE_DIR}/src/cynara-tests/common/cynara_test_helpers.cpp
50 ${PROJECT_SOURCE_DIR}/src/cynara-tests/plugins/plugins.cpp
51 ${PROJECT_SOURCE_DIR}/src/cynara-tests/cynara-test.cpp
52 ${PROJECT_SOURCE_DIR}/src/cynara-tests/test_cases.cpp
53 ${PROJECT_SOURCE_DIR}/src/cynara-tests/test_cases_agent.cpp
54 ${PROJECT_SOURCE_DIR}/src/cynara-tests/test_cases_async.cpp
55 ${PROJECT_SOURCE_DIR}/src/cynara-tests/test_cases_db.cpp
56 ${PROJECT_SOURCE_DIR}/src/cynara-tests/test_cases_helpers.cpp
60 INCLUDE_DIRECTORIES(SYSTEM
61 ${CYNARA_TARGET_DEP_INCLUDE_DIRS}
65 ${PROJECT_SOURCE_DIR}/src/common/
66 ${PROJECT_SOURCE_DIR}/src/cynara-tests/common/
67 ${PROJECT_SOURCE_DIR}/src/cynara-tests/plugins/
72 ADD_EXECUTABLE(${CYNARA_TARGET_TEST} ${CYNARA_TARGET_TEST_SOURCES})
75 TARGET_LINK_LIBRARIES(${CYNARA_TARGET_TEST}
76 ${CYNARA_TARGET_DEP_LIBRARIES}
83 #place for output file
84 INSTALL(TARGETS ${CYNARA_TARGET_TEST}
86 PERMISSIONS OWNER_READ
96 ${PROJECT_SOURCE_DIR}/src/cynara-tests/db_patterns
97 DESTINATION /etc/security-tests/
100 ADD_SUBDIRECTORY(plugins)