Fixed account icon path to manifest file
[platform/framework/web/wrt-installer.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 SET(TARGET_INSTALLER "wrt-installer")
22
23 OPTION(LB_SUPPORT "lb support" OFF)
24
25 SET(INSTALLER_SRC_DIR
26     ${PROJECT_SOURCE_DIR}/src
27     )
28
29 SET(INSTALLER_CONFIG_PARSER
30     ${INSTALLER_SRC_DIR}/configuration_parser
31     )
32
33 SET(INSTALLER_JOBS
34     ${INSTALLER_SRC_DIR}/jobs
35     )
36
37 SET(INSTALLER_INCLUDES
38     ${INSTALLER_SRC_DIR}
39     ${INSTALLER_SRC_DIR}/logic
40     ${INSTALLER_SRC_DIR}/jobs
41     ${INSTALLER_SRC_DIR}/jobs/plugin_install
42     ${INSTALLER_SRC_DIR}/jobs/widget_install
43     ${INSTALLER_SRC_DIR}/jobs/widget_uninstall
44     ${INSTALLER_SRC_DIR}/misc
45     ${INSTALLER_SRC_DIR}/configuration_parser
46     ${INSTALLER_SRC_DIR}/wrt-installer
47     ${INSTALLER_SRC_DIR}/commons
48     ${INSTALLER_SRC_DIR}/pkg-manager
49 )
50
51 SET(INSTALLER_SOURCES
52     ${INSTALLER_CONFIG_PARSER}/widget_parser.cpp
53     ${INSTALLER_CONFIG_PARSER}/parser_runner.cpp
54     ${INSTALLER_CONFIG_PARSER}/ignoring_parser.cpp
55     ${INSTALLER_CONFIG_PARSER}/deny_all_parser.cpp
56     ${INSTALLER_CONFIG_PARSER}/libiriwrapper.cpp
57     ${INSTALLER_JOBS}/job.cpp
58     ${INSTALLER_JOBS}/plugin_install/job_plugin_install.cpp
59     ${INSTALLER_JOBS}/plugin_install/plugin_install_task.cpp
60     ${INSTALLER_JOBS}/plugin_install/plugin_objects.cpp
61     ${INSTALLER_JOBS}/plugin_install/plugin_metafile_reader.cpp
62     ${INSTALLER_JOBS}/widget_install/job_widget_install.cpp
63     ${INSTALLER_JOBS}/widget_install/manifest.cpp
64     ${INSTALLER_JOBS}/widget_install/task_commons.cpp
65     ${INSTALLER_JOBS}/widget_install/task_widget_config.cpp
66     ${INSTALLER_JOBS}/widget_install/task_database.cpp
67     ${INSTALLER_JOBS}/widget_install/task_configuration.cpp
68     ${INSTALLER_JOBS}/widget_install/ace_registration.cpp
69     ${INSTALLER_JOBS}/widget_install/task_file_manipulation.cpp
70     ${INSTALLER_JOBS}/widget_install/task_smack.cpp
71     ${INSTALLER_JOBS}/widget_install/task_ace_check.cpp
72     ${INSTALLER_JOBS}/widget_install/task_manifest_file.cpp
73     ${INSTALLER_JOBS}/widget_install/task_certify.cpp
74     ${INSTALLER_JOBS}/widget_install/task_certify_level.cpp
75     ${INSTALLER_JOBS}/widget_install/task_prepare_files.cpp
76     ${INSTALLER_JOBS}/widget_install/task_recovery.cpp
77     ${INSTALLER_JOBS}/widget_install/task_install_ospsvc.cpp
78     ${INSTALLER_JOBS}/widget_install/task_update_files.cpp
79     ${INSTALLER_JOBS}/widget_install/task_remove_backup.cpp
80     ${INSTALLER_JOBS}/widget_install/task_encrypt_resource.cpp
81     ${INSTALLER_JOBS}/widget_install/task_prepare_reinstall.cpp
82     ${INSTALLER_JOBS}/widget_install/task_pkg_info_update.cpp
83     ${INSTALLER_JOBS}/widget_install/widget_security.cpp
84     ${INSTALLER_JOBS}/widget_install/widget_update_info.cpp
85     ${INSTALLER_JOBS}/widget_install/directory_api.cpp
86     ${INSTALLER_JOBS}/widget_install/widget_unzip.cpp
87     ${INSTALLER_JOBS}/widget_uninstall/job_widget_uninstall.cpp
88     ${INSTALLER_JOBS}/widget_uninstall/task_check.cpp
89     ${INSTALLER_JOBS}/widget_uninstall/task_remove_files.cpp
90     ${INSTALLER_JOBS}/widget_uninstall/task_remove_custom_handlers.cpp
91     ${INSTALLER_JOBS}/widget_uninstall/task_db_update.cpp
92     ${INSTALLER_JOBS}/widget_uninstall/task_smack.cpp
93     ${INSTALLER_JOBS}/widget_uninstall/task_uninstall_ospsvc.cpp
94     ${INSTALLER_JOBS}/widget_uninstall/task_delete_pkginfo.cpp
95     ${INSTALLER_SRC_DIR}/logic/installer_logic.cpp
96     ${INSTALLER_SRC_DIR}/logic/installer_controller.cpp
97     ${INSTALLER_SRC_DIR}/misc/wac_widget_id.cpp
98     ${INSTALLER_SRC_DIR}/misc/feature_logic.cpp
99     ${INSTALLER_SRC_DIR}/misc/libxml_utils.cpp
100     ${INSTALLER_SRC_DIR}/misc/widget_location.cpp
101     ${INSTALLER_SRC_DIR}/misc/widget_install_to_external.cpp
102     ${INSTALLER_SRC_DIR}/misc/plugin_path.cpp
103     ${INSTALLER_SRC_DIR}/pkg-manager/pkgmgr_signal.cpp
104     )
105
106 IF(LB_SUPPORT)
107     SET(INSTALLER_SOURCES
108         ${INSTALLER_SOURCES}
109         )
110     MESSAGE(STATUS "adding definition -DLB_SUPPORT")
111     ADD_DEFINITIONS("-DLB_SUPPORT")
112 ENDIF(LB_SUPPORT)
113
114 MESSAGE(STATUS "add -DSEP_INSTALLER")
115 ADD_DEFINITIONS("-DSEP_INSTALLER")
116
117
118 PKG_CHECK_MODULES(INSTALLER_STATIC_DEP
119     dpl-efl
120     dpl-event-efl
121     dpl-utils-efl
122     dpl-wrt-dao-ro
123     dpl-wrt-dao-rw
124     wrt-commons-custom-handler-dao-rw
125     wrt-commons-security-origin-dao
126     wrt-commons-widget-interface-dao
127     wrt-plugins-types
128     pkgmgr-installer
129     pkgmgr-parser
130     pkgmgr-info
131     web-provider
132     libsmack
133     REQUIRED
134 )
135
136 PKG_CHECK_MODULES(SYS_INSTALLER_STATIC_DEP
137     appsvc
138     libxml-2.0
139     openssl
140     cert-svc-vcore
141     security-install
142     ecore-x
143     xmlsec1
144     libidn
145     libiri
146     libpcrecpp
147     ail
148     elementary
149     tapi
150     shortcut
151     capi-appfw-app-manager
152     app2sd
153     libprivilege-control
154     REQUIRED
155 )
156
157 INCLUDE_DIRECTORIES( SYSTEM ${SYS_INSTALLER_STATIC_DEP_INCLUDE_DIRS})
158
159 INCLUDE_DIRECTORIES(
160     ${INSTALLER_DEP_INCLUDES}
161     ${INSTALLER_INCLUDES}
162     ${INSTALLER_STATIC_DEP_INCLUDE_DIRS}
163     ${OSP_APPFW_INCLUDES}
164     )
165
166 ADD_LIBRARY(${TARGET_INSTALLER_STATIC} STATIC
167     ${INSTALLER_SOURCES}
168     )
169
170 ADD_DEFINITIONS(${INSTALLER_STATIC_DEP_CFLAGS})
171 ADD_DEFINITIONS(${INSTALLER_STATIC_DEP_CFLAGS_OTHERS})
172 ADD_DEFINITIONS(${SYS_INSTALLER_STATIC_DEP_CFLAGS})
173 ADD_DEFINITIONS(${SYS_INSTALLER_STATIC_DEP_CFLAGS_OTHERS})
174
175 TARGET_LINK_LIBRARIES(${TARGET_INSTALLER_STATIC}
176     ${INSTALLER_STATIC_DEP_LIBRARIES} "-ldl"
177     ${SYS_INSTALLER_STATIC_DEP_LIBRARIES} "-ldl"
178     )
179
180 #for encryption
181 TARGET_LINK_LIBRARIES(${TARGET_INSTALLER_STATIC} "-lss-client" )
182
183 ADD_SUBDIRECTORY(pkg-manager)
184 ADD_SUBDIRECTORY(wrt-installer)