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