upload tizen1.0 source
[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 #TODO fix it
22 pkg_search_module(wrt-plugin-api REQUIRED wrt-plugin-api>=1.1.1)
23 pkg_search_module(webkit REQUIRED ewebkit>=0.1.0)
24
25 set(TARGET_NAME ${TARGET_COMMONS_JAVASCRIPT})
26
27 include_directories(${DIR_JS_COMMONS}
28                     ${INCLUDE_JS_INDEPENDENT}
29                     ${wrt-plugin-api_INCLUDE_DIRS}
30                     ${webkit_INCLUDE_DIRS}}
31                     )
32
33
34 set(SRCS
35   ${CMAKE_CURRENT_SOURCE_DIR}/Converter.cpp
36   ${CMAKE_CURRENT_SOURCE_DIR}/ScopedJSStringRef.cpp
37   ${CMAKE_CURRENT_SOURCE_DIR}/JSCallbackManager.cpp
38   ${CMAKE_CURRENT_SOURCE_DIR}/JSUtils.cpp
39   ${CMAKE_CURRENT_SOURCE_DIR}/ScopedJSStringRef.cpp
40   ${CMAKE_CURRENT_SOURCE_DIR}/Validator.cpp
41   # wrapper for simple version of aceCheckAcces
42   ${CMAKE_CURRENT_SOURCE_DIR}/Security/SecurityFunctionDeclaration.cpp
43   #ECMA Script Exception
44   ${CMAKE_CURRENT_SOURCE_DIR}/JSDOMException.cpp
45   ${CMAKE_CURRENT_SOURCE_DIR}/DOMExceptionData.cpp
46   ${CMAKE_CURRENT_SOURCE_DIR}/JSDOMExceptionFactory.cpp
47   #Pending Operation support
48   ${CMAKE_CURRENT_SOURCE_DIR}/JSPendingOperation.cpp
49 )
50
51
52 add_library(${TARGET_NAME} SHARED ${SRCS})
53 target_link_libraries(${TARGET_NAME}
54         ${LIBS_COMMONS}
55         ${webkit_LIBRARIES}
56         ${TARGET_COMMONS}
57 )
58 set_target_properties(${TARGET_NAME} PROPERTIES 
59  SOVERSION ${CMAKE_PROJECT_API_VERSION}
60  VERSION ${CMAKE_PROJECT_VERSION}
61 )
62
63 INSTALL(TARGETS ${TARGET_NAME} LIBRARY DESTINATION ${DESTINATION_LIB_PREFIX})
64
65 #utils
66 install_header_file(PrivateObject.h)
67 #tools
68 install_header_file(Converter.h)
69 install_header_file(Validator.h)
70 install_header_file(JSUtils.h)
71 install_header_file(ScopedJSStringRef.h)
72 #callback manager
73 install_header_file(JSCallbackManager.h)
74 #exceptions
75 install_header_file(JSDOMException.h)
76 install_header_file(JSDOMExceptionFactory.h)
77 install_header_file(DOMExceptionData.h)
78 install_header_file(SecurityExceptions.h)
79 #static declarations
80 install_header_file(Security/StaticDeclaration.h)
81 install_header_file(Security/SecurityFunctionDeclaration.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