Initialize Tizen 2.3
[framework/web/wrt-plugins-common.git] / src / CommonsJavaScript / 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_JS})
18 ENDMACRO()
19
20
21 PKG_SEARCH_MODULE(webkit2 REQUIRED ewebkit2)
22
23 SET(TARGET_NAME ${TARGET_COMMONS_JAVASCRIPT})
24
25 INCLUDE_DIRECTORIES(${DIR_JS_COMMONS}
26                     ${wrt-plugin-api_INCLUDE_DIRS}
27                     ${webkit2_INCLUDE_DIRS}}
28                     )
29
30
31 SET(SRCS
32   ${CMAKE_CURRENT_SOURCE_DIR}/Converter.cpp
33   ${CMAKE_CURRENT_SOURCE_DIR}/ScopedJSStringRef.cpp
34   ${CMAKE_CURRENT_SOURCE_DIR}/JSCallbackManager.cpp
35   ${CMAKE_CURRENT_SOURCE_DIR}/JSUtils.cpp
36   ${CMAKE_CURRENT_SOURCE_DIR}/ScopedJSStringRef.cpp
37   ${CMAKE_CURRENT_SOURCE_DIR}/Validator.cpp
38   #ECMA Script Exception
39   ${CMAKE_CURRENT_SOURCE_DIR}/JSDOMException.cpp
40   ${CMAKE_CURRENT_SOURCE_DIR}/DOMExceptionData.cpp
41   ${CMAKE_CURRENT_SOURCE_DIR}/JSDOMExceptionFactory.cpp
42   #Pending Operation support
43   ${CMAKE_CURRENT_SOURCE_DIR}/JSPendingOperation.cpp
44   #support safe protect
45   ${CMAKE_CURRENT_SOURCE_DIR}/JSLifeManager.cpp
46 )
47
48
49 ADD_LIBRARY(${TARGET_NAME} SHARED ${SRCS})
50 TARGET_LINK_LIBRARIES(${TARGET_NAME}
51         ${LIBS_COMMONS}
52         ${webkit2_LIBRARIES}
53         ${TARGET_COMMONS}
54 )
55
56 SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
57     COMPILE_DEFINITIONS LOG_TAG="${LOG_TAG}")
58
59 SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
60  SOVERSION ${CMAKE_PROJECT_API_VERSION}
61  VERSION ${CMAKE_PROJECT_VERSION}
62 )
63
64 INSTALL(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${DESTINATION_LIB_PREFIX})
65
66 #utils
67 INSTALL_HEADER_FILE(PrivateObject.h)
68 #tools
69 INSTALL_HEADER_FILE(Converter.h)
70 INSTALL_HEADER_FILE(Validator.h)
71 INSTALL_HEADER_FILE(JSUtils.h)
72 INSTALL_HEADER_FILE(ScopedJSStringRef.h)
73 #callback manager
74 INSTALL_HEADER_FILE(JSCallbackManager.h)
75 #exceptions
76 INSTALL_HEADER_FILE(JSDOMException.h)
77 INSTALL_HEADER_FILE(JSDOMExceptionFactory.h)
78 INSTALL_HEADER_FILE(DOMExceptionData.h)
79 INSTALL_HEADER_FILE(SecurityExceptions.h)
80 #static declarations
81 INSTALL_HEADER_FILE(Security/StaticDeclaration.h)
82 #pending operation
83 INSTALL_HEADER_FILE(SupportPendingOperation.h)
84 INSTALL_HEADER_FILE(Utils.h)
85 INSTALL_HEADER_FILE(JSPendingOperation.h)
86 INSTALL_HEADER_FILE(JSPendingOperationPrivateObject.h)
87 #Safe Protect
88 INSTALL_HEADER_FILE(JSLifeManager.h)
89