tizen beta release
[platform/framework/web/wrt.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 #
16 # @file     CMakeLists.txt
17 # @author   Lukasz Wrzosek (l.wrzosek@samsung.com)
18 # @version     1.0
19 #
20
21 SET(WRT_SRC_DIR
22    ${PROJECT_SOURCE_DIR}/src
23    )
24
25 SET(WRT_VALIDATION_CORE_DIR
26    ${PROJECT_SOURCE_DIR}/vcore
27    )
28
29 SET(WRT_ACE_CLIENT_DIR
30    ${PROJECT_SOURCE_DIR}/ace_client
31    )
32
33 SET(WRT_CORE_BASE_SOURCES
34     ${WRT_SRC_DIR}/plugin-service/plugin_api.cpp
35     ${WRT_SRC_DIR}/plugin-service/plugin_api_controller.cpp
36     ${WRT_SRC_DIR}/plugin-service/plugin_api_logic.cpp
37     ${WRT_SRC_DIR}/common/force_stop.cpp
38     ${WRT_SRC_DIR}/API/wrt_config.cpp
39     ${WRT_SRC_DIR}/API/wrt_api.cpp
40     ${WRT_SRC_DIR}/API/api_callbacks_translate.cpp
41     ${WRT_SRC_DIR}/domain/application_launcher.cpp
42     ${WRT_SRC_DIR}/domain/global_context.cpp
43     ${WRT_SRC_DIR}/domain/user_agent_profile.cpp
44     ${WRT_SRC_DIR}/domain/user_callback_logic.cpp
45     ${WRT_SRC_DIR}/domain/widget_controller.cpp
46     ${WRT_SRC_DIR}/domain/widget_deserialize_model.cpp
47     ${WRT_SRC_DIR}/domain/widget_localize_model.cpp
48     ${WRT_SRC_DIR}/domain/widget_logic.cpp
49     ${WRT_SRC_DIR}/domain/widget_model.cpp
50     ${WRT_SRC_DIR}/domain/user_callback_controller.cpp
51     ${WRT_SRC_DIR}/domain/dnet/dnet.cpp
52     ${WRT_SRC_DIR}/domain/child_protection/child_protection_agent.cpp
53     ${WRT_SRC_DIR}/domain/powder/powder_syntax.cpp
54     ${WRT_SRC_DIR}/domain/popups_server.cpp
55     ${WRT_SRC_DIR}/domain/main_thread.cpp
56     ${WRT_SRC_DIR}/utils/youtubehd.cpp
57     ${WRT_SRC_DIR}/global_logic/global_logic.cpp
58     ${WRT_SRC_DIR}/global_logic/global_model.cpp
59     ${WRT_SRC_DIR}/rpc/ui-process/rpc_server.cpp
60     ${WRT_SRC_DIR}/rpc/ui-process/rpc_client.cpp
61     ${WRT_SRC_DIR}/rpc/ui-process/fake_rpc_connection.cpp
62     ${WRT_SRC_DIR}/rpc/security-daemon/api/ocsp_server_api.cpp
63     )
64
65 SET(WRT_CORE_INCLUDES
66     ${WRT_VALIDATION_CORE_DIR}/src
67     ${WRT_ACE_CLIENT_DIR}/include
68     ${WRT_SRC_DIR}/plugin-service
69     ${WRT_SRC_DIR}/common
70     ${WRT_SRC_DIR}/utils
71     ${WRT_SRC_DIR}/orm
72     ${WRT_SRC_DIR}/access-control
73     ${WRT_SRC_DIR}/configuration
74     ${WRT_SRC_DIR}/API
75     ${WRT_SRC_DIR}/rpc/security-daemon/api
76     ${WRT_SRC_DIR}/rpc/security-daemon
77     ${WRT_SRC_DIR}/domain
78     ${WRT_SRC_DIR}/domain/dnet
79     ${WRT_SRC_DIR}/domain/child_protection
80     ${WRT_SRC_DIR}/domain/powder
81     ${WRT_SRC_DIR}/localization
82     ${WRT_SRC_DIR}/framework
83     ${WRT_SRC_DIR}/profiling
84     ${WRT_SRC_DIR}/global_logic
85     ${WRT_SRC_DIR}/ui
86     ${WRT_SRC_DIR}/rpc
87     ${WRT_SRC_DIR}/smack
88     ${WRT_SRC_DIR}/popup-process
89     )
90
91 SET(WRT_ACE_DIR
92     ${WRT_SRC_DIR}/access-control/
93    )
94
95 SET(WRT_PLUGIN_LOADING_DIR
96     ${WRT_SRC_DIR}/plugin-service/plugin-loading/
97    )
98
99 SET(WRT_DAO_DIR
100     ${WRT_SRC_DIR}/configuration/
101     )
102
103 SET(WRT_DAO_INCLUDES
104     ${WRT_DAO_DIR}
105    )
106
107 SET(ACE_DAO_INCLUDES
108   ${WRT_ACE_DIR}/dao
109 )
110
111 SET(PLUGIN_LOADING_INCLUDES
112   ${WRT_PLUGIN_LOADING_DIR}
113 )
114
115 SET(ACE_INCLUDES
116   ${WRT_ACE_DIR}
117   ${WRT_ACE_DIR}/common
118   ${WRT_ACE_DIR}/dao
119   ${WRT_ACE_DIR}/engine
120   ${WRT_ACE_DIR}/engine/UI
121   ${WRT_ACE_DIR}/engine/logic
122   ${WRT_ACE_DIR}/engine/xml
123   ${WRT_ACE_DIR}/logic
124   ${WRT_ACE_DIR}/server
125   ${WRT_ACE_DIR}/server/ipc
126   ${WRT_ACE_DIR}/server/null
127   ${WRT_SRC_DIR}/API
128   ${WRT_SRC_DIR}/common
129   ${WRT_SRC_DIR}/configuration
130   ${WRT_SRC_DIR}/domain
131   ${WRT_SRC_DIR}/plugin-service
132   ${WRT_SRC_DIR}/utils
133 )
134
135 SET(ACE_DAO_INCLUDES
136    ${WRT_ACE_DIR}/configuration)
137
138 SET(WRT_EFL_SOURCES
139     ${WRT_SRC_DIR}/domain/efl/evas_object.cpp
140     ${WRT_SRC_DIR}/domain/efl/view_logic.cpp
141     ${WRT_SRC_DIR}/domain/efl/view_logic_keys_support.cpp
142     ${WRT_SRC_DIR}/domain/efl/view_logic_security_support.cpp
143     ${WRT_SRC_DIR}/domain/efl/view_logic_scheme_support.cpp
144     ${WRT_SRC_DIR}/domain/efl/view_logic_uri_support.cpp
145     ${WRT_SRC_DIR}/domain/efl/view_logic_apps_support.cpp
146     ${WRT_SRC_DIR}/domain/efl/view_logic_storage_support.cpp
147     ${WRT_SRC_DIR}/domain/efl/view_logic_password_support.cpp
148     ${WRT_SRC_DIR}/domain/efl/roaming_agent.cpp
149     ${WRT_SRC_DIR}/domain/efl/CommunicationBox.cpp
150     ${WRT_SRC_DIR}/domain/efl/window_data.cpp
151     ${WRT_SRC_DIR}/domain/efl/combobox_picker.cpp
152     ${WRT_SRC_DIR}/domain/efl/AutoSavePopup.cpp
153     ${WRT_SRC_DIR}/domain/efl/vconf_browser_setting.cpp
154     ${WRT_SRC_DIR}/domain/efl/regular_browser_setting.cpp
155 )
156 SET(WRT_EFL_INCLUDES
157     ${WRT_SRC_DIR}/plugin-service/efl
158     ${WRT_SRC_DIR}/domain/efl
159     ${WRT_SRC_DIR}/wrt-client
160     ${WRT_SRC_DIR}/API
161     )
162
163 SET(POWDER_SOURCES)
164 SET(POWDER_INCLUDES)
165
166 SET(WRT_BASIC_DEP
167     libxml-2.0
168     openssl
169     libpcrecpp
170     dpl-popup-efl
171     dpl-efl
172     dpl-vcore
173     dpl-dbus-efl
174     dpl-event-efl
175     dpl-utils-efl
176     glib-2.0
177     gthread-2.0
178     ewebkit
179     edje
180     ecore
181     ecore-x
182     ecore-imf
183     ecore-ipc
184     ecore-evas
185     ecore-file
186     ecore-input
187     evas
188     eina
189     elementary
190     elm-webview
191     vconf
192     cert-svc
193     libsoup-2.4
194     ui-gadget
195     aul
196     libidn
197     xmlsec1
198     secure-storage
199     libiri
200     appsvc
201 )
202
203 IF(SMACK_ENABLED)
204   LIST(APPEND WRT_BASIC_DEP libprivilege-control)
205 ENDIF(SMACK_ENABLED)
206
207 #defining:
208     # WRT_ENGINE_SOURCES
209     # WRT_ENGINE_INCLUDE_DIRS
210
211 PKG_CHECK_MODULES(WRT_ENGINE_DEPS
212     ${WRT_BASIC_DEP}
213     REQUIRED)
214
215 SET(WRT_ENGINE_SOURCES
216     ${WRT_CORE_SOURCES}
217     ${WRT_EFL_SOURCES}
218     ${WITH_ACE_SOURCES}
219     ${WITH_ACE_SETTINGS_SERVER_SOURCES}
220     ${WRT_DAO_INCLUDES}
221     ${WRT_PERFORMANCE_SOURCES}
222     ${WRT_CORE_BASE_SOURCES}
223     ${POWDER_SOURCES}
224 )
225
226 SET(WRT_ENGINE_INCLUDE_DIRS
227     ${WRT_CORE_INCLUDES}
228     ${WRT_EFL_INCLUDES}
229     ${ACE_DAO_INCLUDES}
230     ${PLUGIN_LOADING_INCLUDES}
231     ${ACE_INCLUDES}
232     ${WRT_ENGINE_DEPS_INCLUDE_DIRS}
233     ${WRT_PERFORMANCE_INCLUDES}
234     ${POWDER_INCLUDES}
235 )
236
237 #wrt-engine-static
238 ADD_DEFINITIONS(${WRT_ENGINE_DEPS_CFLAGS})
239 ADD_DEFINITIONS(${WRT_ENGINE_DEPS_CFLAGS_OTHER})
240 ADD_DEFINITIONS("-DSEPARATED_SINGLETON_IMPLEMENTATION")
241 INCLUDE_DIRECTORIES(${WRT_ENGINE_INCLUDE_DIRS})
242
243 ADD_LIBRARY(${TARGET_WRT_ENGINE_STATIC} STATIC
244     ${WRT_ENGINE_SOURCES}
245 )
246
247 TARGET_LINK_LIBRARIES(${TARGET_WRT_ENGINE_STATIC}
248     ${TARGET_VCORE_LIB}
249 )
250
251 SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
252     SOVERSION ${PROJECT_VERSION})
253
254 SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
255     COMPILE_FLAGS -fPIC)
256 SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
257     COMPILE_FLAGS "-include profiling_util.h")
258
259 TARGET_LINK_LIBRARIES(${TARGET_WRT_ENGINE_STATIC}
260     ${TARGET_ACE_LIB}
261     ${TARGET_WRT_DAO_RW_LIB}
262     ${PROF_LIB}
263     ${TARGET_ACE_CLIENT_LIB}
264     ${TARGET_PLUGIN_LOADING_LIB}
265     )
266
267 # adding engine dependencies for tests
268 WRT_INCLUDE_DIRECTORIES(${WRT_ENGINE_INCLUDE_DIRS})
269 WRT_LINK_DIRECTORIES(${WRT_ENGINE_DEPS_LIBRARY_DIRS})
270 WRT_TARGET_LINK_LIBRARIES(${WRT_ENGINE_DEPS_LIBRARIES})
271
272 ADD_SUBDIRECTORY(arch)
273 ADD_SUBDIRECTORY(wrt-client)
274 ADD_SUBDIRECTORY(wrt-launcher)
275 ADD_SUBDIRECTORY(plugin-service)
276 ADD_SUBDIRECTORY(popup-process)
277 ADD_SUBDIRECTORY(profiling)
278 ADD_SUBDIRECTORY(setting)