Reduce unnecessary resize
[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     )
62
63 SET(WRT_CORE_INCLUDES
64     ${WRT_SRC_DIR}/plugin-service
65     ${WRT_SRC_DIR}/domain
66     ${WRT_SRC_DIR}/profiling
67     ${WRT_SRC_DIR}/view
68     )
69
70 SET(WRT_PLUGIN_LOADING_DIR
71     ${WRT_SRC_DIR}/plugin-service/plugin-loading/
72    )
73
74
75 SET(PLUGIN_LOADING_INCLUDES
76   ${WRT_PLUGIN_LOADING_DIR}
77 )
78
79 SET(WRT_BASIC_DEP
80     dpl-efl
81     dpl-dbus-efl
82     dpl-event-efl
83     dpl-utils-efl
84     wrt-popup-ace-runner
85     security-core
86     security-client
87 )
88
89 IF(X11_SUPPORT)
90 SET(SYS_WRT_BASIC_DEP
91     openssl
92     libpcrecpp
93     glib-2.0
94     gthread-2.0
95     libsoup-2.4
96     libiri
97     appsvc
98     cert-svc-vcore
99     edje
100     ecore
101     ecore-x
102     evas
103     eina
104     ewebkit2
105     elementary
106     vconf
107     cert-svc
108     ui-gadget-1
109     secure-storage
110     capi-appfw-app-manager
111 )
112 ELSE(X11_SUPPORT)
113 SET(SYS_WRT_BASIC_DEP
114     openssl
115     libpcrecpp
116     glib-2.0
117     gthread-2.0
118     libsoup-2.4
119     libiri
120     appsvc
121     cert-svc-vcore
122     edje
123     ecore
124     ecore-wayland
125     evas
126     eina
127     ewebkit2
128     elementary
129     vconf
130     cert-svc
131     ui-gadget-1
132     secure-storage
133     app2sd
134 )
135 ENDIF(X11_SUPPORT)
136
137 IF(SMACK_ENABLED)
138   LIST(APPEND SYS_WRT_BASIC_DEP libprivilege-control)
139 ENDIF(SMACK_ENABLED)
140
141 IF (USE_MESA)
142    LIST(APPEND SYS_WRT_BASIC_DEP glesv2)
143 ELSE ()
144    LIST(APPEND SYS_WRT_BASIC_DEP gles20)
145 ENDIF ()
146
147 PKG_CHECK_MODULES(SYS_WRT_ENGINE_DEPS
148     ${SYS_WRT_BASIC_DEP}
149     REQUIRED
150 )
151
152 PKG_CHECK_MODULES(WRT_ENGINE_DEPS
153     ${WRT_BASIC_DEP}
154     REQUIRED
155 )
156
157 SET(WRT_ENGINE_INCLUDE_DIRS
158     ${WRT_CORE_INCLUDES}
159     ${PLUGIN_LOADING_INCLUDES}
160     ${WRT_ENGINE_DEPS_INCLUDE_DIRS}
161 )
162
163 #wrt-engine-static
164 ADD_DEFINITIONS(${SYS_WRT_ENGINE_DEPS_CFLAGS})
165 ADD_DEFINITIONS(${SYS_WRT_ENGINE_DEPS_CFLAGS_OTHER})
166 ADD_DEFINITIONS(${WRT_ENGINE_DEPS_CFLAGS})
167 ADD_DEFINITIONS(${WRT_ENGINE_DEPS_CFLAGS_OTHER})
168
169 INCLUDE_DIRECTORIES(SYSTEM ${SYS_WRT_ENGINE_DEPS_INCLUDE_DIRS})
170 INCLUDE_DIRECTORIES(${WRT_ENGINE_INCLUDE_DIRS})
171
172 ADD_LIBRARY(${TARGET_WRT_ENGINE_STATIC} STATIC
173     ${WRT_CORE_BASE_SOURCES}
174 )
175
176 SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
177     SOVERSION ${PROJECT_API_VERSION}
178     VERSION ${PROJECT_VERSION})
179
180 SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
181     COMPILE_FLAGS -fPIC)
182 SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
183     COMPILE_FLAGS "-include profiling_util.h")
184
185 INSTALL(FILES
186     ${WRT_SRC_DIR}/domain/widget_model.h
187     DESTINATION include/${PROJECT_NAME}
188 )
189
190 INSTALL(FILES
191     ${WRT_SRC_DIR}/domain/widget_data_types.h
192     DESTINATION include/${PROJECT_NAME}
193 )
194
195 ADD_SUBDIRECTORY(view)
196 ADD_SUBDIRECTORY(api_new)
197 ADD_SUBDIRECTORY(wrt-client)
198 ADD_SUBDIRECTORY(wrt-launcher)
199 ADD_SUBDIRECTORY(plugin-service)
200 IF(PROFILING)
201     ADD_SUBDIRECTORY(profiling)
202 ENDIF(PROFILING)
203 ADD_SUBDIRECTORY(wrt-launchpad-daemon)