045b5782e39b4a57772cf6b728b5bc329da1a4bc
[platform/core/test/security-tests.git] / tests / CMakeLists.txt
1 # Copyright (c) 2015 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
16 cmake_minimum_required(VERSION 2.8.3)
17
18 INCLUDE(FindPkgConfig)
19 SET(INNER_TARGET_TEST "security-tests-inner-test")
20
21 PKG_CHECK_MODULES(INNER_TARGET_DEP
22     REQUIRED
23     glib-2.0
24     )
25
26 #files to compile
27 SET(INNER_TARGET_TEST_SOURCES
28     ${PROJECT_SOURCE_DIR}/tests/inner-test.cpp
29     ${PROJECT_SOURCE_DIR}/tests/common/test_cases_timeout.cpp
30     )
31
32 #header directories
33 INCLUDE_DIRECTORIES(SYSTEM
34     ${INNER_TARGET_DEP_INCLUDE_DIRS}
35     )
36
37 INCLUDE_DIRECTORIES(
38     ${PROJECT_SOURCE_DIR}/src/framework/include/
39     ${PROJECT_SOURCE_DIR}/src/
40     )
41
42 #output format
43 ADD_EXECUTABLE(${INNER_TARGET_TEST} ${INNER_TARGET_TEST_SOURCES})
44
45 #linker directories
46 TARGET_LINK_LIBRARIES(${INNER_TARGET_TEST}
47     ${INNER_TARGET_DEP_LIBRARIES}
48     tests-common
49     dpl-test-framework
50     )
51
52 #place for output file
53 INSTALL(TARGETS ${INNER_TARGET_TEST}
54     DESTINATION /usr/bin
55     PERMISSIONS OWNER_READ
56                 OWNER_WRITE
57                 OWNER_EXECUTE
58                 GROUP_READ
59                 GROUP_EXECUTE
60                 WORLD_READ
61                 WORLD_EXECUTE
62     )