upload tizen1.0 source
[framework/web/wrt-plugins-common.git] / src / Commons / 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 macro(install_header_file HEADER_FILE)
16     INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER_FILE}
17         DESTINATION ${DESTINATION_HEADERS_NON_JS})
18 endmacro()
19
20 macro(install_wrtaccess_header_file HEADER_FILE)
21     INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER_FILE}
22         DESTINATION ${DESTINATION_HEADERS_NON_JS}/WrtAccess)
23 endmacro()
24
25 macro(install_widget_interface_dao_header_file HEADER_FILE)
26     INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER_FILE}
27         DESTINATION ${DESTINATION_HEADERS_NON_JS}/WidgetInterfaceDAO)
28 endmacro()
29
30 include_config_file(WrtAccess)
31
32 pkg_search_module(wrt-plugin-api REQUIRED wrt-plugin-api>=0.7.0)
33 pkg_search_module(ace-client REQUIRED ace-client)
34 pkg_search_module(dpl-event REQUIRED dpl-event-efl)
35
36 set(WRT_COMMONS_DEPENDECIES_INCLUDES
37     ${INCLUDE_JS_INDEPENDENT}
38     ${wrt-plugin-api_INCLUDE_DIRS}
39     ${ace-client_INCLUDE_DIRS}
40     )
41
42 include_directories(${WRT_COMMONS_DEPENDECIES_INCLUDES})
43
44 set(TARGET_NAME ${TARGET_COMMONS})
45
46 set(SRCS
47   ${SRCS_WRT_ACCESS}
48   ${CMAKE_CURRENT_SOURCE_DIR}/Base64.cpp
49   ${CMAKE_CURRENT_SOURCE_DIR}/FunctionDefinition.cpp
50   ${CMAKE_CURRENT_SOURCE_DIR}/Regex.cpp
51   ${CMAKE_CURRENT_SOURCE_DIR}/RegexUtils.cpp
52   ${CMAKE_CURRENT_SOURCE_DIR}/StringBuilder.cpp
53   ${CMAKE_CURRENT_SOURCE_DIR}/StringUtils.cpp
54   ${CMAKE_CURRENT_SOURCE_DIR}/ThreadPool.cpp
55   #PARENT_SCOPE
56 )
57
58 add_library(${TARGET_NAME} SHARED ${SRCS})
59 target_link_libraries(${TARGET_NAME}
60   ${LIBS_COMMONS}
61   ${ace-client_LIBRARIES}
62   ${dpl-event_LIBRARIES}
63 )
64 set_target_properties(${TARGET_NAME} PROPERTIES 
65  SOVERSION ${CMAKE_PROJECT_API_VERSION}
66  VERSION ${CMAKE_PROJECT_VERSION}
67 )
68
69 INSTALL(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${DESTINATION_LIB_PREFIX})
70
71 install_header_file(FunctionDeclaration.h)
72 install_header_file(FunctionDefinition.h)
73 install_header_file(Base64.h)
74 install_header_file(Deprecated.h)
75 install_header_file(Dimension.h)
76 install_header_file(Emitters.h)
77 install_header_file(EventListener.h)
78 install_header_file(EventReceiver.h)
79 install_header_file(Exception.h)
80 install_header_file(IEvent.h)
81 install_header_file(IExternEventCanceler.h)
82 install_header_file(ListenerEventEmitter.h)
83 install_header_file(ListenerEvent.h)
84 install_header_file(Range.h)
85 install_header_file(Regex.h)
86 install_header_file(RegexPatterns.h)
87 install_header_file(RegexUtils.h)
88 install_header_file(StaticAssert.h)
89 install_header_file(StringBuilder.h)
90 install_header_file(StringUtils.h)
91 install_header_file(ThreadPool.h)
92 install_header_file(TypesDeclaration.h)
93 install_header_file(TypeTraits.h)
94 install_header_file(plugin_initializer_def.h)
95 install_wrtaccess_header_file(WrtAccess/WrtAccess.h)