c1fbd82143cbdbfefd131ab40f23d7ad8f3fd354
[framework/web/wrt-commons.git] / tests / core / CMakeLists.txt
1 # Copyright (c) 2011 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 # @file        CMakeLists.txt
16 # @author      Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
17 # @version     1.0
18 # @brief
19 #
20
21 #
22 # Test files
23 #
24 # Define all DPL tests sources.
25 # Runner is responsible for runnint it all and
26 # generating proper output files
27 #
28
29 SET(TARGET_NAME "dpl-tests-core")
30
31 # Set DPL tests sources
32 SET(DPL_TESTS_SOURCES
33     ${PROJECT_SOURCE_DIR}/tests/core/main.cpp
34     ${PROJECT_SOURCE_DIR}/tests/core/test_address.cpp
35     ${PROJECT_SOURCE_DIR}/tests/core/test_binary_queue.cpp
36     ${PROJECT_SOURCE_DIR}/tests/core/test_foreach.cpp
37     ${PROJECT_SOURCE_DIR}/tests/core/test_fast_delegate.cpp
38     ${PROJECT_SOURCE_DIR}/tests/core/test_log_unhandled_exception.cpp
39     ${PROJECT_SOURCE_DIR}/tests/core/test_once.cpp
40     ${PROJECT_SOURCE_DIR}/tests/core/test_serialization.cpp
41     ${PROJECT_SOURCE_DIR}/tests/core/test_scoped_array.cpp
42     ${PROJECT_SOURCE_DIR}/tests/core/test_scoped_close.cpp
43     ${PROJECT_SOURCE_DIR}/tests/core/test_scoped_fclose.cpp
44     ${PROJECT_SOURCE_DIR}/tests/core/test_scoped_free.cpp
45     ${PROJECT_SOURCE_DIR}/tests/core/test_scoped_ptr.cpp
46     ${PROJECT_SOURCE_DIR}/tests/core/test_semaphore.cpp
47     ${PROJECT_SOURCE_DIR}/tests/core/test_shared_ptr.cpp
48     ${PROJECT_SOURCE_DIR}/tests/core/test_string.cpp
49     ${PROJECT_SOURCE_DIR}/tests/core/test_task.cpp
50     ${PROJECT_SOURCE_DIR}/tests/core/test_thread.cpp
51     ${PROJECT_SOURCE_DIR}/tests/core/test_type_list.cpp
52     ${PROJECT_SOURCE_DIR}/tests/core/test_zip_input.cpp
53 )
54
55 INCLUDE_DIRECTORIES(
56     ${SYS_EFL_INCLUDE_DIRS}
57     ${DPL_TEST_INCLUDE_DIR}
58 )
59
60 LINK_DIRECTORIES(${SYS_EFL_LIBRARY_DIRS})
61
62 ADD_EXECUTABLE(${TARGET_NAME} ${DPL_TESTS_SOURCES})
63
64 TARGET_LINK_LIBRARIES(
65     ${TARGET_NAME}
66     ${SYS_EFL_LIBRARIES}
67     ${TARGET_DPL_EFL}
68     ${TARGET_DPL_TEST_ENGINE_EFL}
69 )
70
71 SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
72     BUILD_WITH_INSTALL_RPATH ON
73     INSTALL_RPATH_USE_LINK_PATH ON
74 )
75
76 INSTALL(TARGETS ${TARGET_NAME}
77         DESTINATION bin
78         PERMISSIONS OWNER_READ
79                     OWNER_WRITE
80                     OWNER_EXECUTE
81                     GROUP_READ
82                     GROUP_EXECUTE
83                     WORLD_READ
84                     WORLD_EXECUTE
85 )
86
87 INSTALL(FILES
88         ${PROJECT_SOURCE_DIR}/tests/core/data/sample.zip
89         DESTINATION /opt/apps/wrt/wrt-commons/tests/core
90 )