Update wrt-commons_0.2.53
[framework/web/wrt-commons.git] / build / dbus / 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 # Check required modules
22 INCLUDE(FindPkgConfig)
23 PKG_CHECK_MODULES(SYS_EFL_DBUS
24     dbus-1
25     gio-2.0
26     REQUIRED)
27
28 # Add core include directories
29 INCLUDE_DIRECTORIES(
30     ${DPL_LOG_INCLUDE_DIR}
31     ${DPL_CORE_INCLUDE_DIR}
32     ${DPL_DBUS_INCLUDE_DIR}
33     ${DPL_EVENT_INCLUDE_DIR}
34     ${SYS_EFL_INCLUDE_DIRS})
35
36 LINK_DIRECTORIES(
37     ${SYS_EFL_DBUS_LIBRARY_DIRS}
38 )
39
40 # Base EFL based DPL library
41 SET(DPL_EFL_DBUS_LIBRARY "${PROJECT_NAME}-dbus-efl")
42
43 # Build shared library
44
45 ADD_LIBRARY(${TARGET_DPL_DBUS_EFL} SHARED  ${DPL_DBUS_SOURCES})
46
47 TARGET_LINK_LIBRARIES(${TARGET_DPL_DBUS_EFL}
48     ${SYS_EFL_DBUS_LIBRARIES}
49     ${TARGET_DPL_EFL}
50     ${TARGET_DPL_EVENT_EFL}
51 )
52
53 # Target library properties
54 SET_TARGET_PROPERTIES(${TARGET_DPL_DBUS_EFL} PROPERTIES
55     SOVERSION ${API_VERSION} 
56  VERSION ${VERSION}
57     CLEAN_DIRECT_OUTPUT 1
58     OUTPUT_NAME ${DPL_EFL_DBUS_LIBRARY})
59
60 # Install libraries
61 INSTALL(TARGETS ${TARGET_DPL_DBUS_EFL}
62         DESTINATION lib)
63
64 # Install detail headers
65 INSTALL(FILES ${DPL_DBUS_HEADERS}
66         DESTINATION include/dpl-efl/dpl/dbus)
67
68 # Install pkgconfig script
69 configure_and_install_pkg(dpl-dbus-efl.pc)