upload tizen1.0 source
[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 #it is here, so no INCLUDE_DIRS and DEFINITIONS are passed there
22 ADD_SUBDIRECTORY(view)
23
24
25 SET(WRT_SRC_DIR
26    ${PROJECT_SOURCE_DIR}/src
27    )
28
29 SET(WRT_VALIDATION_CORE_DIR
30    ${PROJECT_SOURCE_DIR}/vcore
31    )
32
33 SET(WRT_ACE_CLIENT_DIR
34    ${PROJECT_SOURCE_DIR}/ace_client
35    )
36
37 SET(WRT_CORE_BASE_SOURCES
38     ${WRT_SRC_DIR}/common/force_stop.cpp
39     ${WRT_SRC_DIR}/API/wrt_api.cpp
40     ${WRT_SRC_DIR}/API/api_callbacks_translate.cpp
41     ${WRT_SRC_DIR}/domain/global_context.cpp
42     ${WRT_SRC_DIR}/domain/widget_controller.cpp
43     ${WRT_SRC_DIR}/domain/widget_deserialize_model.cpp
44     ${WRT_SRC_DIR}/domain/widget_localize_model.cpp
45     ${WRT_SRC_DIR}/domain/widget_logic.cpp
46     ${WRT_SRC_DIR}/domain/widget_model.cpp
47     ${WRT_SRC_DIR}/domain/main_thread.cpp
48     ${WRT_SRC_DIR}/domain/popups_server.cpp
49     ${WRT_SRC_DIR}/popup-process/CommunicationBox.cpp # TODO remove it
50     )
51
52 SET(WRT_CORE_INCLUDES
53     ${WRT_VALIDATION_CORE_DIR}/src
54     ${WRT_ACE_CLIENT_DIR}/include
55     ${WRT_SRC_DIR}/plugin-service
56     ${WRT_SRC_DIR}/common
57     ${WRT_SRC_DIR}/utils
58     ${WRT_SRC_DIR}/orm
59     ${WRT_SRC_DIR}/access-control
60     ${WRT_SRC_DIR}/configuration
61     ${WRT_SRC_DIR}/API
62     ${WRT_SRC_DIR}/domain
63     ${WRT_SRC_DIR}/localization
64     ${WRT_SRC_DIR}/framework
65     ${WRT_SRC_DIR}/profiling
66     ${WRT_SRC_DIR}/global_logic
67     ${WRT_SRC_DIR}/ui
68     ${WRT_SRC_DIR}/rpc
69     ${WRT_SRC_DIR}/smack
70     ${WRT_SRC_DIR}/popup-process
71     ${WRT_SRC_DIR}/view
72     )
73
74 SET(WRT_ACE_DIR
75     ${WRT_SRC_DIR}/access-control/
76    )
77
78 SET(WRT_PLUGIN_LOADING_DIR
79     ${WRT_SRC_DIR}/plugin-service/plugin-loading/
80    )
81
82 SET(WRT_DAO_DIR
83     ${WRT_SRC_DIR}/configuration/
84     )
85
86 SET(WRT_DAO_INCLUDES
87     ${WRT_DAO_DIR}
88    )
89
90 SET(ACE_DAO_INCLUDES
91   ${WRT_ACE_DIR}/dao
92 )
93
94 SET(PLUGIN_LOADING_INCLUDES
95   ${WRT_PLUGIN_LOADING_DIR}
96 )
97
98 SET(ACE_INCLUDES
99   ${WRT_ACE_DIR}
100   ${WRT_ACE_DIR}/common
101   ${WRT_ACE_DIR}/dao
102   ${WRT_ACE_DIR}/engine
103   ${WRT_ACE_DIR}/engine/UI
104   ${WRT_ACE_DIR}/engine/logic
105   ${WRT_ACE_DIR}/engine/xml
106   ${WRT_ACE_DIR}/logic
107   ${WRT_ACE_DIR}/server
108   ${WRT_ACE_DIR}/server/ipc
109   ${WRT_ACE_DIR}/server/null
110   ${WRT_SRC_DIR}/API
111   ${WRT_SRC_DIR}/common
112   ${WRT_SRC_DIR}/configuration
113   ${WRT_SRC_DIR}/domain
114   ${WRT_SRC_DIR}/utils
115 )
116
117 SET(ACE_DAO_INCLUDES
118    ${WRT_ACE_DIR}/configuration)
119
120 SET(WRT_BASIC_DEP
121     libxml-2.0
122     openssl
123     libpcrecpp
124     dpl-popup-efl
125     dpl-efl
126     vcore
127     dpl-dbus-efl
128     dpl-event-efl
129     dpl-utils-efl
130     glib-2.0
131     gthread-2.0
132     ewebkit
133     edje
134     ecore
135     ecore-x
136     ecore-imf
137     ecore-ipc
138     ecore-evas
139     ecore-file
140     ecore-input
141     evas
142     eina
143     elementary
144     elm-webview
145     vconf
146     cert-svc
147     libsoup-2.4
148     ui-gadget
149     aul
150     libidn
151     xmlsec1
152     secure-storage
153     libiri
154     appsvc
155     wrt-security
156 )
157
158 IF(SMACK_ENABLED)
159   LIST(APPEND WRT_BASIC_DEP libprivilege-control)
160 ENDIF(SMACK_ENABLED)
161
162 #defining:
163     # WRT_ENGINE_SOURCES
164     # WRT_ENGINE_INCLUDE_DIRS
165
166 PKG_CHECK_MODULES(WRT_ENGINE_DEPS
167     ${WRT_BASIC_DEP}
168     REQUIRED)
169
170 SET(WRT_ENGINE_SOURCES
171     ${WRT_CORE_SOURCES}
172     ${WITH_ACE_SOURCES}
173     ${WITH_ACE_SETTINGS_SERVER_SOURCES}
174     ${WRT_DAO_INCLUDES}
175     ${WRT_PERFORMANCE_SOURCES}
176     ${WRT_CORE_BASE_SOURCES}
177 )
178
179 SET(WRT_ENGINE_INCLUDE_DIRS
180     ${WRT_CORE_INCLUDES}
181     ${ACE_DAO_INCLUDES}
182     ${PLUGIN_LOADING_INCLUDES}
183     ${ACE_INCLUDES}
184     ${WRT_ENGINE_DEPS_INCLUDE_DIRS}
185     ${WRT_PERFORMANCE_INCLUDES}
186 )
187
188 #wrt-engine-static
189 ADD_DEFINITIONS(${WRT_ENGINE_DEPS_CFLAGS})
190 ADD_DEFINITIONS(${WRT_ENGINE_DEPS_CFLAGS_OTHER})
191 INCLUDE_DIRECTORIES(${WRT_ENGINE_INCLUDE_DIRS})
192
193 ADD_LIBRARY(${TARGET_WRT_ENGINE_STATIC} STATIC
194     ${WRT_ENGINE_SOURCES}
195 )
196
197 TARGET_LINK_LIBRARIES(${TARGET_WRT_ENGINE_STATIC}
198     ${TARGET_VCORE_LIB}
199 )
200
201 SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
202     SOVERSION ${PROJECT_API_VERSION}
203     VERSION ${PROJECT_VERSION})
204
205 SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
206     COMPILE_FLAGS -fPIC)
207 SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
208     COMPILE_FLAGS "-include profiling_util.h")
209
210 TARGET_LINK_LIBRARIES(${TARGET_WRT_ENGINE_STATIC}
211     ${TARGET_ACE_LIB} #TODO is it needed here?
212     ${TARGET_WRT_DAO_RW_LIB}
213     ${PROF_LIB}
214     )
215
216 # adding engine dependencies for tests
217 WRT_INCLUDE_DIRECTORIES(${WRT_ENGINE_INCLUDE_DIRS})
218 WRT_LINK_DIRECTORIES(${WRT_ENGINE_DEPS_LIBRARY_DIRS})
219 WRT_TARGET_LINK_LIBRARIES(${WRT_ENGINE_DEPS_LIBRARIES})
220
221 ADD_SUBDIRECTORY(arch)
222 ADD_SUBDIRECTORY(wrt-client)
223 ADD_SUBDIRECTORY(wrt-launcher)
224 ADD_SUBDIRECTORY(plugin-service)
225 #ADD_SUBDIRECTORY(popup-process)
226 ADD_SUBDIRECTORY(profiling)