tizen beta release
[framework/web/wrt-plugins-common.git] / tests / 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      Lukasz Marek (l.marek@samsung.com)
17 # @version     1.0
18 # @brief
19 #
20
21 #
22 # Test files
23 #
24 # Define all wrt-plugins-common tests sources.
25 # Runner is responsible for runnint it all and
26 # generating proper output files
27 #
28
29 SET(TARGET_NAME wrt-plugins-commons-test)
30
31 pkg_search_module(dpl REQUIRED dpl-efl>=1.0.0)
32 pkg_search_module(dpl-test REQUIRED dpl-test-efl)
33 pkg_search_module(dpl-wrt-dao-ro REQUIRED dpl-wrt-dao-ro)
34
35 SET(WRT_PLUGINS_COMMONS_TESTS_SOURCES
36     ${PROJECT_SOURCE_DIR}/tests/main.cpp
37     ${PROJECT_SOURCE_DIR}/tests/test_widget_interface_dao.cpp
38 )
39
40 SET(WRT_PLUGINS_COMMONS_TESTS_DIR
41     ${PROJECT_SOURCE_DIR}/src/
42     ${PROJECT_SOURCE_DIR}/src/Commons/
43     ${PROJECT_SOURCE_DIR}/src/CommonsJavaScript/
44     ${PROJECT_SOURCE_DIR}/src/modules/tizen/
45     ${PROJECT_SOURCE_DIR}/src/modules/API/
46     ${PROJECT_SOURCE_DIR}/tests
47 )
48
49 include_directories(
50     ${WRT_PLUGINS_COMMONS_TESTS_DIR}
51     ${dpl_INCLUDE_DIRS}
52     ${dpl-wrt-dao-ro_INCLUDE_DIRS}
53     ${dpl-test_INCLUDE_DIRS}
54 )
55
56 ADD_EXECUTABLE(${TARGET_NAME}
57     ${WRT_PLUGINS_COMMONS_TESTS_SOURCES}
58 )
59
60 TARGET_LINK_LIBRARIES(${TARGET_NAME}
61     ${dpl_LIBRARIES}
62     ${dpl-test_LIBRARIES}
63     ${dpl-wrt-dao-ro_LIBRARIES}
64     "wrt-plugins-widget-interface-dao"
65 )
66
67 SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
68     RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/
69     BUILD_WITH_INSTALL_RPATH ON
70     INSTALL_RPATH_USE_LINK_PATH ON
71 )
72
73 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/wrt_plugins_commons_test_prepare_db.sh
74     ${PROJECT_SOURCE_DIR}/bin/wrt_plugins_commons_test_prepare_db.sh COPYONLY)