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 Zbigniew Kostrzewa (z.kostrzewa@samsung.com)
21 INCLUDE(FindPkgConfig)
23 SET(TARGET_DBUS_TESTS "dpl-tests-dbus")
24 SET(TARGET_DBUS_TEST_SERVICE "dpl-dbus-test-service")
26 PKG_CHECK_MODULES(DBUS_PKG
35 ${PROJECT_SOURCE_DIR}/tests/dbus/main.cpp
36 ${PROJECT_SOURCE_DIR}/tests/dbus/test_cases.cpp
37 ${PROJECT_SOURCE_DIR}/tests/dbus/dbus_test.cpp
38 ${PROJECT_SOURCE_DIR}/tests/dbus/loop_control.cpp
41 SET(DBUS_TEST_SERVICE_SRCS
42 ${PROJECT_SOURCE_DIR}/tests/dbus/test_service.cpp
43 ${PROJECT_SOURCE_DIR}/tests/dbus/loop_control.cpp
47 ${DBUS_PKG_INCLUDE_DIRS}
48 ${DPL_TEST_INCLUDE_DIR}
51 LINK_DIRECTORIES(${DBUS_PKG_LIBRARY_DIRS})
53 ADD_EXECUTABLE(${TARGET_DBUS_TESTS}
57 TARGET_LINK_LIBRARIES(${TARGET_DBUS_TESTS}
60 ${TARGET_DPL_DBUS_EFL}
61 ${TARGET_DPL_TEST_ENGINE_EFL}
64 SET_TARGET_PROPERTIES(${TARGET_DBUS_TESTS} PROPERTIES
65 BUILD_WITH_INSTALL_RPATH ON
66 INSTALL_RPATH_USE_LINK_PATH ON
69 ADD_EXECUTABLE(${TARGET_DBUS_TEST_SERVICE}
70 ${DBUS_TEST_SERVICE_SRCS}
73 TARGET_LINK_LIBRARIES(${TARGET_DBUS_TEST_SERVICE}
76 ${TARGET_DPL_DBUS_EFL}
79 SET_TARGET_PROPERTIES(${TARGET_DBUS_TEST_SERVICE} PROPERTIES
80 BUILD_WITH_INSTALL_RPATH ON
81 INSTALL_RPATH_USE_LINK_PATH ON
84 INSTALL(TARGETS ${TARGET_DBUS_TESTS} ${TARGET_DBUS_TEST_SERVICE}
86 PERMISSIONS OWNER_READ
96 ${PROJECT_SOURCE_DIR}/tests/dbus/data/org.tizen.DBusTestService.service
97 DESTINATION /usr/share/dbus-1/services