Initialize Tizen 2.3
[framework/web/wrt-plugins-common.git] / src_mobile / 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   # wrapper for simple version of aceCheckAcces
39   ${CMAKE_CURRENT_SOURCE_DIR}/Security/SecurityFunctionDeclaration.cpp
40   #ECMA Script Exception
41   ${CMAKE_CURRENT_SOURCE_DIR}/JSDOMException.cpp
42   ${CMAKE_CURRENT_SOURCE_DIR}/DOMExceptionData.cpp
43   ${CMAKE_CURRENT_SOURCE_DIR}/JSDOMExceptionFactory.cpp
44   #Pending Operation support
45   ${CMAKE_CURRENT_SOURCE_DIR}/JSPendingOperation.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 set_target_properties(${TARGET_NAME} PROPERTIES
56  SOVERSION ${CMAKE_PROJECT_API_VERSION}
57  VERSION ${CMAKE_PROJECT_VERSION}
58 )
59
60 INSTALL(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${DESTINATION_LIB_PREFIX})
61
62 #utils
63 install_header_file(PrivateObject.h)
64 #tools
65 install_header_file(Converter.h)
66 install_header_file(Validator.h)
67 install_header_file(JSUtils.h)
68 install_header_file(ScopedJSStringRef.h)
69 #callback manager
70 install_header_file(JSCallbackManager.h)
71 #exceptions
72 install_header_file(JSDOMException.h)
73 install_header_file(JSDOMExceptionFactory.h)
74 install_header_file(DOMExceptionData.h)
75 install_header_file(SecurityExceptions.h)
76 #static declarations
77 install_header_file(Security/StaticDeclaration.h)
78 install_header_file(Security/SecurityFunctionDeclaration.h)
79 #pending operation
80 install_header_file(SupportPendingOperation.h)
81 install_header_file(Utils.h)
82 install_header_file(JSPendingOperation.h)
83 install_header_file(JSPendingOperationPrivateObject.h)
84