Register a key callback to handle back key event with W3C permission popup
[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 ADD_DEFINITIONS("-DWRT_LOG")
22
23 # "smack-labeling-support-static" static library -------------------------------
24 SET(SMACK_LABELING_SUPPORT_STATIC  "smack-labeling-support-static")
25 PKG_CHECK_MODULES(SMACK_LABELING_SUPPORT_DEPS
26     dpl-efl
27     libsmack
28     REQUIRED
29 )
30 SET(SMACK_LABELING_SUPPORT_SOURCES
31     ${PROJECT_SOURCE_DIR}/src/wrt-client/process_pool/smack_labeling_support.cpp
32     )
33 SET(SMACK_LABELING_SUPPORT_INCLUDES
34     ${PROJECT_SOURCE_DIR}/src/wrt-client/process_pool/
35    )
36 INCLUDE_DIRECTORIES(
37     ${SMACK_LABELING_SUPPORT_INCLUDES}
38     ${SMACK_LABELING_SUPPORT_DEPS_INCLUDE_DIRS}
39     )
40 ADD_LIBRARY(${SMACK_LABELING_SUPPORT_STATIC} STATIC
41     ${SMACK_LABELING_SUPPORT_SOURCES}
42     )
43 TARGET_LINK_LIBRARIES(${SMACK_LABELING_SUPPORT_STATIC}
44     ${SMACK_LABELING_SUPPORT_DEPS_LIBRARIES}
45     )
46 # ------------------------------------------------------------------------------
47
48 #it is here, so no INCLUDE_DIRS and DEFINITIONS are passed there
49
50 SET(WRT_SRC_DIR
51    ${PROJECT_SOURCE_DIR}/src
52    )
53
54 SET(WRT_CORE_BASE_SOURCES
55     ${WRT_SRC_DIR}/domain/application_data.cpp
56     ${WRT_SRC_DIR}/domain/widget_data_types.cpp
57     ${WRT_SRC_DIR}/domain/widget_deserialize_model.cpp
58     ${WRT_SRC_DIR}/domain/localization_setting.cpp
59     ${WRT_SRC_DIR}/domain/widget_model.cpp
60     ${WRT_SRC_DIR}/domain/main_thread.cpp
61     ${WRT_SRC_DIR}/domain/prepare_external_storage.cpp
62     )
63
64 SET(WRT_CORE_INCLUDES
65     ${WRT_SRC_DIR}/plugin-service
66     ${WRT_SRC_DIR}/domain
67     ${WRT_SRC_DIR}/profiling
68     ${WRT_SRC_DIR}/view
69     )
70
71 SET(WRT_PLUGIN_LOADING_DIR
72     ${WRT_SRC_DIR}/plugin-service/plugin-loading/
73    )
74
75
76 SET(PLUGIN_LOADING_INCLUDES
77   ${WRT_PLUGIN_LOADING_DIR}
78 )
79
80 SET(WRT_BASIC_DEP
81     dpl-efl
82     dpl-dbus-efl
83     dpl-event-efl
84     dpl-utils-efl
85     wrt-popup-ace-runner
86     security-core
87     security-client
88 )
89
90 IF(X11_SUPPORT)
91 SET(SYS_WRT_BASIC_DEP
92     openssl
93     libpcrecpp
94     glib-2.0
95     gthread-2.0
96     libsoup-2.4
97     libiri
98     appsvc
99     cert-svc-vcore
100     edje
101     ecore
102     ecore-x
103     evas
104     eina
105     ewebkit2
106     elementary
107     vconf
108     cert-svc
109     ui-gadget-1
110     secure-storage
111     app2sd
112     capi-appfw-app-manager
113 )
114 ELSE(X11_SUPPORT)
115 SET(SYS_WRT_BASIC_DEP
116     openssl
117     libpcrecpp
118     glib-2.0
119     gthread-2.0
120     libsoup-2.4
121     libiri
122     appsvc
123     cert-svc-vcore
124     edje
125     ecore
126     ecore-wayland
127     evas
128     eina
129     ewebkit2
130     elementary
131     vconf
132     cert-svc
133     ui-gadget-1
134     secure-storage
135     app2sd
136 )
137 ENDIF(X11_SUPPORT)
138
139 IF(SMACK_ENABLED)
140   LIST(APPEND SYS_WRT_BASIC_DEP libprivilege-control)
141 ENDIF(SMACK_ENABLED)
142
143 IF (USE_MESA)
144    LIST(APPEND SYS_WRT_BASIC_DEP glesv2)
145 ELSE ()
146    LIST(APPEND SYS_WRT_BASIC_DEP gles20)
147 ENDIF ()
148
149 PKG_CHECK_MODULES(SYS_WRT_ENGINE_DEPS
150     ${SYS_WRT_BASIC_DEP}
151     REQUIRED
152 )
153
154 PKG_CHECK_MODULES(WRT_ENGINE_DEPS
155     ${WRT_BASIC_DEP}
156     REQUIRED
157 )
158
159 SET(WRT_ENGINE_INCLUDE_DIRS
160     ${WRT_CORE_INCLUDES}
161     ${PLUGIN_LOADING_INCLUDES}
162     ${WRT_ENGINE_DEPS_INCLUDE_DIRS}
163 )
164
165 #wrt-engine-static
166 ADD_DEFINITIONS(${SYS_WRT_ENGINE_DEPS_CFLAGS})
167 ADD_DEFINITIONS(${SYS_WRT_ENGINE_DEPS_CFLAGS_OTHER})
168 ADD_DEFINITIONS(${WRT_ENGINE_DEPS_CFLAGS})
169 ADD_DEFINITIONS(${WRT_ENGINE_DEPS_CFLAGS_OTHER})
170
171 INCLUDE_DIRECTORIES(SYSTEM ${SYS_WRT_ENGINE_DEPS_INCLUDE_DIRS})
172 INCLUDE_DIRECTORIES(${WRT_ENGINE_INCLUDE_DIRS})
173
174 ADD_LIBRARY(${TARGET_WRT_ENGINE_STATIC} STATIC
175     ${WRT_CORE_BASE_SOURCES}
176 )
177
178 SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
179     SOVERSION ${PROJECT_API_VERSION}
180     VERSION ${PROJECT_VERSION})
181
182 SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
183     COMPILE_FLAGS -fPIC)
184 SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
185     COMPILE_FLAGS "-include profiling_util.h")
186
187 INSTALL(FILES
188     ${WRT_SRC_DIR}/domain/widget_model.h
189     DESTINATION include/${PROJECT_NAME}
190 )
191
192 INSTALL(FILES
193     ${WRT_SRC_DIR}/domain/widget_data_types.h
194     DESTINATION include/${PROJECT_NAME}
195 )
196
197 ADD_SUBDIRECTORY(view)
198 ADD_SUBDIRECTORY(api_new)
199 ADD_SUBDIRECTORY(wrt-client)
200 ADD_SUBDIRECTORY(wrt-launcher)
201 ADD_SUBDIRECTORY(plugin-service)
202 IF(PROFILING)
203     ADD_SUBDIRECTORY(profiling)
204 ENDIF(PROFILING)
205 ADD_SUBDIRECTORY(wrt-launchpad-daemon)