Initialize Tizen 2.3
[framework/web/wrt-commons.git] / build_wearable / rpc / CMakeLists.txt
1
2 # Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 #
4 #    Licensed under the Apache License, Version 2.0 (the "License");
5 #    you may not use this file except in compliance with the License.
6 #    You may obtain a copy of the License at
7 #
8 #        http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #    Unless required by applicable law or agreed to in writing, software
11 #    distributed under the License is distributed on an "AS IS" BASIS,
12 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #    See the License for the specific language governing permissions and
14 #    limitations under the License.
15 #
16 # @file        CMakeLists.txt
17 # @author      Lukasz Marek (l.marek@samsung.com)
18 # @version     1.0
19 # @brief
20 #
21
22 # Check required modules
23 INCLUDE(FindPkgConfig)
24 PKG_CHECK_MODULES(SYS_EFL_RPC
25     ecore
26     appcore-efl
27     REQUIRED
28 )
29
30 # Add core include directories
31 INCLUDE_DIRECTORIES(
32     ${DPL_LOG_INCLUDE_DIR}
33     ${DPL_CORE_INCLUDE_DIR}
34     ${DPL_SOCKET_INCLUDE_DIR}
35     ${DPL_EVENT_INCLUDE_DIR}
36     ${DPL_RPC_INCLUDE_DIR}
37 )
38
39 INCLUDE_DIRECTORIES(SYSTEM ${SYS_EFL_RPC_INCLUDE_DIRS})
40
41 LINK_DIRECTORIES(
42     ${SYS_EFL_RPC_LIBRARY_DIRS}
43 )
44
45 # Base EFL based DPL library
46 SET(DPL_EFL_RPC_LIBRARY "${PROJECT_NAME}-rpc-efl")
47
48 # Build shared library
49
50 ADD_LIBRARY(${TARGET_DPL_RPC_EFL} SHARED  ${DPL_RPC_SOURCES})
51
52 TARGET_LINK_LIBRARIES(${TARGET_DPL_RPC_EFL}
53     ${SYS_EFL_RPC_LIBRARIES}
54     ${TARGET_DPL_EFL}
55     ${TARGET_DPL_EVENT_EFL}
56     ${TARGET_DPL_SOCKET_EFL}
57 )
58
59 # Target library properties
60 SET_TARGET_PROPERTIES(${TARGET_DPL_RPC_EFL} PROPERTIES
61     SOVERSION ${API_VERSION} 
62  VERSION ${VERSION}
63     CLEAN_DIRECT_OUTPUT 1
64     OUTPUT_NAME ${DPL_EFL_RPC_LIBRARY})
65
66 # Install libraries
67 INSTALL(TARGETS ${TARGET_DPL_RPC_EFL}
68         DESTINATION lib)
69
70 # Install detail headers
71 INSTALL(FILES ${DPL_RPC_HEADERS}
72         DESTINATION include/dpl-efl/dpl/rpc)
73
74 # Install pkgconfig script
75 configure_and_install_pkg(dpl-rpc-efl.pc)