-# Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+# Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# @file CMakeLists.txt
# @author Lukasz Marek (l.marek@samsung.com)
-# @version 1.0
-# @brief
#
-#
-# Test files
-#
-# Define all wrt-plugins-common tests sources.
-# Runner is responsible for runnint it all and
-# generating proper output files
-#
-
-SET(TARGET_NAME wrt-plugins-commons-test)
-
-pkg_search_module(dpl REQUIRED dpl-efl>=1.0.0)
-pkg_search_module(dpl-test REQUIRED dpl-test-efl)
-pkg_search_module(dpl-wrt-dao-ro REQUIRED dpl-wrt-dao-ro)
-
-SET(WRT_PLUGINS_COMMONS_TESTS_SOURCES
- ${PROJECT_SOURCE_DIR}/tests/main.cpp
- ${PROJECT_SOURCE_DIR}/tests/test_widget_interface_dao.cpp
-)
-
-SET(WRT_PLUGINS_COMMONS_TESTS_DIR
- ${PROJECT_SOURCE_DIR}/src/
- ${PROJECT_SOURCE_DIR}/src/Commons/
- ${PROJECT_SOURCE_DIR}/src/CommonsJavaScript/
- ${PROJECT_SOURCE_DIR}/src/modules/tizen/
- ${PROJECT_SOURCE_DIR}/src/modules/API/
- ${PROJECT_SOURCE_DIR}/tests
-)
-
-include_directories(
- ${WRT_PLUGINS_COMMONS_TESTS_DIR}
- ${dpl_INCLUDE_DIRS}
- ${dpl-wrt-dao-ro_INCLUDE_DIRS}
- ${dpl-test_INCLUDE_DIRS}
-)
-
-ADD_EXECUTABLE(${TARGET_NAME}
- ${WRT_PLUGINS_COMMONS_TESTS_SOURCES}
-)
-
-TARGET_LINK_LIBRARIES(${TARGET_NAME}
- ${dpl_LIBRARIES}
- ${dpl-test_LIBRARIES}
- ${dpl-wrt-dao-ro_LIBRARIES}
- "wrt-plugins-widget-interface-dao"
-)
-
-SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
- RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/
- BUILD_WITH_INSTALL_RPATH ON
- INSTALL_RPATH_USE_LINK_PATH ON
-)
+INCLUDE(CMakeUtils.txt)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/wrt_plugins_commons_test_prepare_db.sh
- ${PROJECT_SOURCE_DIR}/bin/wrt_plugins_commons_test_prepare_db.sh COPYONLY)
+ADD_SUBDIRECTORY(dao)