tizen 2.4 release
[framework/web/wrt-plugins-common.git] / src / modules / packages / WidgetInterface / 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
16 MACRO(install_header_file HEADER_FILE)
17     INSTALL(FILES ${API_WIDGET_INTERFACE_PATH}/${HEADER_FILE}
18         DESTINATION ${DESTINATION_HEADER_PREFIX}/WidgetInterface)
19 ENDMACRO()
20
21 PKG_SEARCH_MODULE(dpl-wrt-dao-ro REQUIRED dpl-wrt-dao-ro)
22 PKG_SEARCH_MODULE(wrt-commons-widget-interface-dao REQUIRED wrt-commons-widget-interface-dao)
23
24 INCLUDE_DIRECTORIES(
25     ${WIDGET_INTERFACE_INCLUDE_DIRS}
26     ${dpl-wrt-dao-ro_INCLUDE_DIRS}
27     ${wrt-commons-widget-interface-dao_INCLUDE_DIRS})
28
29 SET(TARGET_NAME ${TARGET_MODULE_WIDGET_INTERFACE})
30
31 SET(SRCS
32     ${SRCS_WIDGET_INTERFACE}
33 )
34
35 ADD_LIBRARY(${TARGET_NAME} SHARED ${SRCS})
36
37 TARGET_LINK_LIBRARIES(${TARGET_NAME}
38    ${LIBS_COMMONS}
39    ${dpl-wrt-dao-ro_LIBRARIES}
40    ${wrt-commons-widget-interface-dao_LIBRARIES}
41 )
42
43 SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
44     COMPILE_DEFINITIONS LOG_TAG="${LOG_TAG}")
45
46 SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
47  SOVERSION ${CMAKE_PROJECT_API_VERSION}
48  VERSION ${CMAKE_PROJECT_VERSION}
49 )
50
51 INSTALL(TARGETS ${TARGET_NAME} LIBRARY DESTINATION
52     ${DESTINATION_LIB_PREFIX})
53
54 INSTALL_HEADER_FILE(WidgetInterface.h)