Update wrt-installer_0.0.54
[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 SET(INSTALLER_SRC_DIR
24     ${PROJECT_SOURCE_DIR}/src
25     )
26
27 SET(INSTALLER_CONFIG_PARSER
28     ${INSTALLER_SRC_DIR}/configuration_parser
29     )
30
31 SET(INSTALLER_JOBS
32     ${INSTALLER_SRC_DIR}/jobs
33     )
34
35 SET(INSTALLER_INCLUDES
36     ${INSTALLER_SRC_DIR}
37     ${INSTALLER_SRC_DIR}/logic
38     ${INSTALLER_SRC_DIR}/jobs
39     ${INSTALLER_SRC_DIR}/jobs/plugin_install
40     ${INSTALLER_SRC_DIR}/jobs/widget_install
41     ${INSTALLER_SRC_DIR}/jobs/widget_uninstall
42     ${INSTALLER_SRC_DIR}/misc
43     ${INSTALLER_SRC_DIR}/configuration_parser
44     ${INSTALLER_SRC_DIR}/wrt-installer
45     ${INSTALLER_SRC_DIR}/commons
46     ${INSTALLER_SRC_DIR}/pkg-manager
47 )
48
49 SET(INSTALLER_SOURCES
50     ${INSTALLER_CONFIG_PARSER}/widget_parser.cpp
51     ${INSTALLER_CONFIG_PARSER}/parser_runner.cpp
52     ${INSTALLER_CONFIG_PARSER}/ignoring_parser.cpp
53     ${INSTALLER_CONFIG_PARSER}/deny_all_parser.cpp
54     ${INSTALLER_CONFIG_PARSER}/libiriwrapper.cpp
55     ${INSTALLER_JOBS}/job.cpp
56     ${INSTALLER_JOBS}/plugin_install/job_plugin_install.cpp
57     ${INSTALLER_JOBS}/plugin_install/plugin_install_task.cpp
58     ${INSTALLER_JOBS}/plugin_install/plugin_objects.cpp
59     ${INSTALLER_JOBS}/plugin_install/plugin_metafile_reader.cpp
60     ${INSTALLER_JOBS}/widget_install/job_widget_install.cpp
61     ${INSTALLER_JOBS}/widget_install/manifest.cpp
62     ${INSTALLER_JOBS}/widget_install/task_commons.cpp
63     ${INSTALLER_JOBS}/widget_install/task_unzip.cpp
64     ${INSTALLER_JOBS}/widget_install/task_widget_config.cpp
65     ${INSTALLER_JOBS}/widget_install/task_db_update.cpp
66     ${INSTALLER_JOBS}/widget_install/task_file_manipulation.cpp
67     ${INSTALLER_JOBS}/widget_install/task_smack.cpp
68     ${INSTALLER_JOBS}/widget_install/task_ace_check.cpp
69     ${INSTALLER_JOBS}/widget_install/task_manifest_file.cpp
70     ${INSTALLER_JOBS}/widget_install/task_certify.cpp
71     ${INSTALLER_JOBS}/widget_install/task_private_storage.cpp
72     ${INSTALLER_JOBS}/widget_install/task_prepare_files.cpp
73     ${INSTALLER_JOBS}/widget_install/task_recovery.cpp
74     ${INSTALLER_JOBS}/widget_install/task_install_ospsvc.cpp
75     ${INSTALLER_JOBS}/widget_install/task_update_files.cpp
76     ${INSTALLER_JOBS}/widget_install/task_new_db_insert.cpp
77     ${INSTALLER_JOBS}/widget_install/task_remove_backup.cpp
78     ${INSTALLER_JOBS}/widget_install/task_encrypt_resource.cpp
79     ${INSTALLER_JOBS}/widget_install/wac_security.cpp
80     ${INSTALLER_JOBS}/widget_install/widget_update_info.cpp
81     ${INSTALLER_JOBS}/widget_install/widget_install_popup.cpp
82     ${INSTALLER_JOBS}/widget_uninstall/job_widget_uninstall.cpp
83     ${INSTALLER_JOBS}/widget_uninstall/task_check.cpp
84     ${INSTALLER_JOBS}/widget_uninstall/task_remove_files.cpp
85     ${INSTALLER_JOBS}/widget_uninstall/task_db_update.cpp
86     ${INSTALLER_JOBS}/widget_uninstall/task_smack.cpp
87     ${INSTALLER_JOBS}/widget_uninstall/task_uninstall_ospsvc.cpp
88     ${INSTALLER_SRC_DIR}/logic/installer_logic.cpp
89     ${INSTALLER_SRC_DIR}/logic/installer_controller.cpp
90     ${INSTALLER_SRC_DIR}/misc/wac_widget_id.cpp
91     ${INSTALLER_SRC_DIR}/misc/feature_logic.cpp
92     ${INSTALLER_SRC_DIR}/misc/libxml_utils.cpp
93     ${INSTALLER_SRC_DIR}/misc/widget_location.cpp
94     ${INSTALLER_SRC_DIR}/pkg-manager/pkgmgr_signal.cpp
95     )
96
97 MESSAGE(STATUS "add -DSEP_INSTALLER")
98 ADD_DEFINITIONS("-DSEP_INSTALLER")
99
100
101 PKG_CHECK_MODULES(INSTALLER_STATIC_DEP
102     libxml-2.0
103     openssl
104     dpl-efl
105     vcore
106     wrt-security
107     dpl-event-efl
108     dpl-utils-efl
109     dpl-wrt-dao-ro
110     dpl-wrt-dao-rw
111     dpl-encryption
112     ace-install
113     ecore-x
114     xmlsec1
115     libidn
116     libiri
117     libpcrecpp
118     wrt-plugins-types
119     ail
120     elementary
121     pkgmgr-installer
122     pkgmgr-parser
123     tapi
124     shortcut
125     REQUIRED
126     )
127
128 INCLUDE_DIRECTORIES(
129     ${INSTALLER_DEP_INCLUDES}
130     ${INSTALLER_INCLUDES}
131     ${INSTALLER_STATIC_DEP_INCLUDE_DIRS}
132     )
133
134 ADD_LIBRARY(${TARGET_INSTALLER_STATIC} STATIC
135     ${INSTALLER_SOURCES}
136     )
137
138 ADD_DEFINITIONS(${INSTALLER_STATIC_DEP_CFLAGS})
139 ADD_DEFINITIONS(${INSTALLER_STATIC_DEP_CFLAGS_OTHERS})
140
141 TARGET_LINK_LIBRARIES(${TARGET_INSTALLER_STATIC}
142     ${INSTALLER_STATIC_DEP_LIBRARIES}
143     )
144
145 SET_TARGET_PROPERTIES(${TARGET_INSTALLER_STATIC} PROPERTIES
146         COMPILE_FLAGS -fPIC)
147
148 ADD_SUBDIRECTORY(pkg-manager)
149 ADD_SUBDIRECTORY(wrt-installer)