1 # Copyright (c) 2011 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.
15 # @file CMakeLists.txt
16 # @author Lukasz Marek (l.marek@samsung.com)
24 # Define all wrt-plugins-common tests sources.
25 # Runner is responsible for runnint it all and
26 # generating proper output files
29 SET(TARGET_NAME wrt-plugins-commons-test)
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)
35 SET(WRT_PLUGINS_COMMONS_TESTS_SOURCES
36 ${PROJECT_SOURCE_DIR}/tests/main.cpp
37 ${PROJECT_SOURCE_DIR}/tests/test_widget_interface_dao.cpp
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
50 ${WRT_PLUGINS_COMMONS_TESTS_DIR}
52 ${dpl-wrt-dao-ro_INCLUDE_DIRS}
53 ${dpl-test_INCLUDE_DIRS}
56 ADD_EXECUTABLE(${TARGET_NAME}
57 ${WRT_PLUGINS_COMMONS_TESTS_SOURCES}
60 TARGET_LINK_LIBRARIES(${TARGET_NAME}
63 ${dpl-wrt-dao-ro_LIBRARIES}
64 "wrt-plugins-widget-interface-dao"
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
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)