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 macro(install_header_file HEADER_FILE)
16 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER_FILE}
17 DESTINATION ${DESTINATION_HEADERS_NON_JS})
20 macro(install_wrtaccess_header_file HEADER_FILE)
21 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER_FILE}
22 DESTINATION ${DESTINATION_HEADERS_NON_JS}/WrtAccess)
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)
30 include_config_file(WrtAccess)
32 pkg_search_module(plugin-types REQUIRED wrt-plugins-types)
33 pkg_search_module(ace-client REQUIRED ace-client)
34 pkg_search_module(dpl-event REQUIRED dpl-event-efl)
35 pkg_search_module(icu REQUIRED icu-i18n)
37 set(WRT_COMMONS_DEPENDECIES_INCLUDES
38 ${wrt-plugin-api_INCLUDE_DIRS}
39 ${ace-client_INCLUDE_DIRS}
40 ${plugin-types_INCLUDE_DIRS}
44 include_directories(${WRT_COMMONS_DEPENDECIES_INCLUDES})
46 set(TARGET_NAME ${TARGET_COMMONS})
50 ${CMAKE_CURRENT_SOURCE_DIR}/Base64.cpp
51 ${CMAKE_CURRENT_SOURCE_DIR}/FunctionDefinition.cpp
52 ${CMAKE_CURRENT_SOURCE_DIR}/Regex.cpp
53 ${CMAKE_CURRENT_SOURCE_DIR}/RegexUtils.cpp
54 ${CMAKE_CURRENT_SOURCE_DIR}/StringBuilder.cpp
55 ${CMAKE_CURRENT_SOURCE_DIR}/StringUtils.cpp
56 ${CMAKE_CURRENT_SOURCE_DIR}/ThreadPool.cpp
57 ${CMAKE_CURRENT_SOURCE_DIR}/JSObjectDeclaration.cpp
58 ${CMAKE_CURRENT_SOURCE_DIR}/JSObject.cpp
59 ${CMAKE_CURRENT_SOURCE_DIR}/TimeUtils.cpp
63 add_library(${TARGET_NAME} SHARED ${SRCS})
64 target_link_libraries(${TARGET_NAME}
66 ${ace-client_LIBRARIES}
67 ${dpl-event_LIBRARIES}
71 set_target_properties(${TARGET_NAME} PROPERTIES
72 SOVERSION ${CMAKE_PROJECT_API_VERSION}
73 VERSION ${CMAKE_PROJECT_VERSION}
76 INSTALL(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${DESTINATION_LIB_PREFIX})
78 install_header_file(FunctionDeclaration.h)
79 install_header_file(FunctionDefinition.h)
80 install_header_file(Base64.h)
81 install_header_file(Deprecated.h)
82 install_header_file(Dimension.h)
83 install_header_file(Emitters.h)
84 install_header_file(EventListener.h)
85 install_header_file(EventReceiver.h)
86 install_header_file(Exception.h)
87 install_header_file(IEvent.h)
88 install_header_file(IExternEventCanceler.h)
89 install_header_file(ListenerEventEmitter.h)
90 install_header_file(ListenerEvent.h)
91 install_header_file(Range.h)
92 install_header_file(Regex.h)
93 install_header_file(RegexPatterns.h)
94 install_header_file(RegexUtils.h)
95 install_header_file(StaticAssert.h)
96 install_header_file(StringBuilder.h)
97 install_header_file(StringUtils.h)
98 install_header_file(ThreadPool.h)
99 install_header_file(TypesDeclaration.h)
100 install_header_file(TypeTraits.h)
101 install_header_file(plugin_initializer_def.h)
102 install_header_file(JSObjectDeclaration.h)
103 install_header_file(JSObject.h)
104 install_header_file(TimeUtils.h)
105 install_wrtaccess_header_file(WrtAccess/WrtAccess.h)