tizen 2.4 release
[framework/web/wrt-plugins-common.git] / src / 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 # Includes CMake configuration file (*.cmake), preserving appropriate paths.
16
17 ADD_DEFINITIONS("-DWRT_PLUGINS_COMMON_LOG")
18
19 MACRO(include_config_file INCLUDED_CONFIG_FILE_PATH)
20   GET_FILENAME_COMPONENT(CURRENT_CONFIG_FILE_PATH ${CMAKE_CURRENT_LIST_FILE} PATH)
21   INCLUDE(${CURRENT_CONFIG_FILE_PATH}/${INCLUDED_CONFIG_FILE_PATH}/${CONFIG_FILE_NAME} OPTIONAL)
22 ENDMACRO()
23
24 # Gets actual path for CMake configuration file (*.cmake).
25 # By default, if no argument is passed, current path will be set to variable
26 # named CURRENT_PATH.
27 # @param [Optional] Name of the variable to set with current path.
28 MACRO(get_current_path)
29   SET(VARIABLE "CURRENT_PATH")
30   IF(${ARGC} GREATER 0)
31     SET(VARIABLE ${ARGV0})
32   ENDIF()
33   GET_FILENAME_COMPONENT(${VARIABLE} ${CMAKE_CURRENT_LIST_FILE} PATH)
34 ENDMACRO()
35
36 SET(HOST_ARCH $ENV{DEB_HOST_ARCH})
37 IF("${HOST_ARCH}" MATCHES "armel")
38     SET(HOST_ARCH "armel")
39 ENDIF()
40
41 #target names
42 SET(TARGET_PLUGIN_LOADING_LIB "wrt-plugin-loading")
43 SET(TARGET_COMMONS "wrt-plugins-commons")
44 SET(TARGET_COMMONS_JAVASCRIPT "wrt-plugins-commons-javascript")
45 SET(TARGET_JS_OVERLAY "wrt-plugins-js-overlay")
46 SET(TARGET_POPUP_WRT "wrt-popup-wrt-runtime")
47 SET(TARGET_POPUP_WRT_RUNNER_LIB "wrt-popup-wrt-runner")
48 SET(TARGET_PLUGINS_API_SUPPORT "wrt-plugins-api-support")
49 SET(TARGET_PLUGINS_IPC_MESSAGE_LIB "wrt-plugins-ipc-message")
50 SET(TARGET_XWALK_MODULE_LIB "wrt-xwalk-module")
51
52 SET(PLUGIN_LOADING_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/plugin-loading)
53 SET(PLUGINS_API_SUPPORT_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/plugins-api-support)
54 SET(PLUGINS_IPC_MESSAGE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/plugins-ipc-message)
55
56 ADD_SUBDIRECTORY(plugins-api-support)
57 ADD_SUBDIRECTORY(plugin-loading)
58 ADD_SUBDIRECTORY(js-overlay)
59 ADD_SUBDIRECTORY(Commons)
60 ADD_SUBDIRECTORY(CommonsJavaScript)
61 ADD_SUBDIRECTORY(dispatch-event)
62 ADD_SUBDIRECTORY(modules)
63 ADD_SUBDIRECTORY(standards)
64 ADD_SUBDIRECTORY(wrt-popup)
65
66 # wrt-plugins-installer has been integrated into wrt-instaler 
67 #ADD_SUBDIRECTORY(plugins-installer)
68
69 ADD_SUBDIRECTORY(plugins-ipc-message)
70 ADD_SUBDIRECTORY(xwalk-module)