370b320b71dcb918e849e7add7d2b86957272b17
[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_CORE_BASE_SOURCES
30     ${WRT_SRC_DIR}/domain/global_context.cpp
31     ${WRT_SRC_DIR}/domain/widget_data_types.cpp
32     ${WRT_SRC_DIR}/domain/widget_deserialize_model.cpp
33     ${WRT_SRC_DIR}/domain/localization_setting.cpp
34     ${WRT_SRC_DIR}/domain/widget_model.cpp
35     ${WRT_SRC_DIR}/domain/main_thread.cpp
36     )
37
38 SET(WRT_CORE_INCLUDES
39     ${WRT_SRC_DIR}/plugin-service
40     ${WRT_SRC_DIR}/common
41     ${WRT_SRC_DIR}/utils
42     ${WRT_SRC_DIR}/orm
43     ${WRT_SRC_DIR}/configuration
44     ${WRT_SRC_DIR}/domain
45     ${WRT_SRC_DIR}/localization
46     ${WRT_SRC_DIR}/profiling
47     ${WRT_SRC_DIR}/global_logic
48     ${WRT_SRC_DIR}/ui
49     ${WRT_SRC_DIR}/smack
50     ${WRT_SRC_DIR}/view
51     )
52
53 SET(WRT_PLUGIN_LOADING_DIR
54     ${WRT_SRC_DIR}/plugin-service/plugin-loading/
55    )
56
57
58 SET(PLUGIN_LOADING_INCLUDES
59   ${WRT_PLUGIN_LOADING_DIR}
60 )
61
62 SET(WRT_BASIC_DEP
63     dpl-popup-efl
64     dpl-efl
65     dpl-dbus-efl
66     dpl-event-efl
67     dpl-utils-efl
68     wrt-popup-runner
69     security-core
70     security-client
71 )
72
73
74 SET(SYS_WRT_BASIC_DEP
75     openssl
76     libpcrecpp
77     glib-2.0
78     gthread-2.0
79     libsoup-2.4
80     libiri
81     appsvc
82     cert-svc-vcore
83     edje
84     ecore
85     ecore-x
86     evas
87     eina
88     ewebkit2
89     elementary
90     vconf
91     cert-svc
92     ui-gadget-1
93     secure-storage
94 )
95
96 IF(SMACK_ENABLED)
97   LIST(APPEND SYS_WRT_BASIC_DEP libprivilege-control)
98 ENDIF(SMACK_ENABLED)
99
100
101
102 PKG_CHECK_MODULES(SYS_WRT_ENGINE_DEPS
103     ${SYS_WRT_BASIC_DEP}
104     REQUIRED
105 )
106
107 PKG_CHECK_MODULES(WRT_ENGINE_DEPS
108     ${WRT_BASIC_DEP}
109     REQUIRED
110 )
111
112 SET(WRT_ENGINE_INCLUDE_DIRS
113     ${WRT_CORE_INCLUDES}
114     ${PLUGIN_LOADING_INCLUDES}
115     ${WRT_ENGINE_DEPS_INCLUDE_DIRS}
116 )
117
118 #wrt-engine-static
119 ADD_DEFINITIONS(${SYS_WRT_ENGINE_DEPS_CFLAGS})
120 ADD_DEFINITIONS(${SYS_WRT_ENGINE_DEPS_CFLAGS_OTHER})
121 ADD_DEFINITIONS(${WRT_ENGINE_DEPS_CFLAGS})
122 ADD_DEFINITIONS(${WRT_ENGINE_DEPS_CFLAGS_OTHER})
123
124 INCLUDE_DIRECTORIES(SYSTEM ${SYS_WRT_ENGINE_DEPS_INCLUDE_DIRS})
125 INCLUDE_DIRECTORIES(${WRT_ENGINE_INCLUDE_DIRS})
126
127 ADD_LIBRARY(${TARGET_WRT_ENGINE_STATIC} STATIC
128     ${WRT_CORE_BASE_SOURCES}
129 )
130
131 SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
132     SOVERSION ${PROJECT_API_VERSION}
133     VERSION ${PROJECT_VERSION})
134
135 SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
136     COMPILE_FLAGS -fPIC)
137 SET_TARGET_PROPERTIES(${TARGET_WRT_ENGINE_STATIC} PROPERTIES
138     COMPILE_FLAGS "-include profiling_util.h")
139
140 TARGET_LINK_LIBRARIES(${TARGET_WRT_ENGINE_STATIC}
141     ${TARGET_WRT_DAO_RW_LIB}
142     ${PROF_LIB}
143     )
144
145 INSTALL(FILES
146     ${WRT_SRC_DIR}/domain/widget_model.h
147     DESTINATION include/${PROJECT_NAME}
148 )
149
150 INSTALL(FILES
151     ${WRT_SRC_DIR}/domain/widget_data_types.h
152     DESTINATION include/${PROJECT_NAME}
153 )
154
155 ADD_SUBDIRECTORY(api_new)
156 ADD_SUBDIRECTORY(wrt-client)
157 ADD_SUBDIRECTORY(wrt-launcher)
158 ADD_SUBDIRECTORY(plugin-service)
159 IF(PROFILING)
160     ADD_SUBDIRECTORY(profiling)
161 ENDIF(PROFILING)
162 ADD_SUBDIRECTORY(wrt-launchpad-daemon)