upload tizen1.0 source
[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_CONFIG_GENERATOR
32     ${INSTALLER_SRC_DIR}/config_generator
33     )
34
35 SET(INSTALLER_JOBS
36     ${INSTALLER_SRC_DIR}/jobs
37     )
38
39 SET(INSTALLER_SECURITY
40     ${INSTALLER_SRC_DIR}/security
41     )
42
43 SET(INSTALLER_DEP_CORE_BASE_SOURCE
44     ${INSTALLER_SECURITY}/attribute_facade.cpp
45     ${INSTALLER_SECURITY}/simple_roaming_agent.cpp
46     ${INSTALLER_SECURITY}/security_controller.cpp
47     ${INSTALLER_SECURITY}/security_logic.cpp
48     )
49
50 SET(INSTALLER_INCLUDES
51     ${INSTALLER_SRC_DIR}
52     ${INSTALLER_SRC_DIR}/logic
53     ${INSTALLER_SRC_DIR}/jobs
54     ${INSTALLER_SRC_DIR}/jobs/plugin_install
55     ${INSTALLER_SRC_DIR}/jobs/widget_install
56     ${INSTALLER_SRC_DIR}/jobs/widget_uninstall
57     ${INSTALLER_SRC_DIR}/misc
58     ${INSTALLER_SRC_DIR}/configuration_parser
59     ${INSTALLER_SRC_DIR}/wrt-installer
60     ${INSTALLER_SRC_DIR}/security
61     ${INSTALLER_SRC_DIR}/commons
62 )
63
64 SET(INSTALLER_SOURCES
65     ${INSTALLER_CONFIG_PARSER}/widget_parser.cpp
66     ${INSTALLER_CONFIG_PARSER}/parser_runner.cpp
67     ${INSTALLER_CONFIG_PARSER}/ignoring_parser.cpp
68     ${INSTALLER_CONFIG_PARSER}/deny_all_parser.cpp
69     ${INSTALLER_CONFIG_PARSER}/libiriwrapper.cpp
70     ${INSTALLER_CONFIG_PARSER}/WidgetConfigurationManager.cpp
71     ${INSTALLER_JOBS}/job.cpp
72     ${INSTALLER_JOBS}/plugin_install/job_plugin_install.cpp
73     ${INSTALLER_JOBS}/plugin_install/plugin_install_task.cpp
74     ${INSTALLER_JOBS}/plugin_install/plugin_objects.cpp
75     ${INSTALLER_JOBS}/plugin_install/plugin_metafile_reader.cpp
76     ${INSTALLER_JOBS}/widget_install/job_widget_install.cpp
77     ${INSTALLER_JOBS}/widget_install/task_commons.cpp
78     ${INSTALLER_JOBS}/widget_install/task_unzip.cpp
79     ${INSTALLER_JOBS}/widget_install/task_widget_config.cpp
80     ${INSTALLER_JOBS}/widget_install/task_db_update.cpp
81     ${INSTALLER_JOBS}/widget_install/task_smack.cpp
82     ${INSTALLER_JOBS}/widget_install/task_ace_check.cpp
83     ${INSTALLER_JOBS}/widget_install/task_desktop_file.cpp
84     ${INSTALLER_JOBS}/widget_install/task_certify.cpp
85     ${INSTALLER_JOBS}/widget_install/task_private_storage.cpp
86     ${INSTALLER_JOBS}/widget_install/task_prepare_files.cpp
87     ${INSTALLER_JOBS}/widget_install/wac_security.cpp
88     ${INSTALLER_JOBS}/widget_install/widget_update_info.cpp
89     ${INSTALLER_JOBS}/widget_uninstall/job_widget_uninstall.cpp
90     ${INSTALLER_JOBS}/widget_uninstall/task_check.cpp
91     ${INSTALLER_JOBS}/widget_uninstall/task_remove_files.cpp
92     ${INSTALLER_JOBS}/widget_uninstall/task_db_update.cpp
93     ${INSTALLER_JOBS}/widget_uninstall/task_smack.cpp
94     ${INSTALLER_SRC_DIR}/logic/installer_logic.cpp
95     ${INSTALLER_SRC_DIR}/logic/installer_controller.cpp
96     ${INSTALLER_SRC_DIR}/misc/wac_widget_id.cpp
97     ${INSTALLER_SRC_DIR}/misc/feature_logic.cpp
98     ${INSTALLER_CONFIG_GENERATOR}/config_generator.cpp
99     )
100
101 MESSAGE(STATUS "add -DSEP_INSTALLER")
102 ADD_DEFINITIONS("-DSEP_INSTALLER")
103
104
105 PKG_CHECK_MODULES(INSTALLER_STATIC_DEP
106     libxml-2.0
107     openssl
108     dpl-efl
109     vcore
110     wrt-security
111     dpl-event-efl
112     dpl-utils-efl
113     dpl-popup-efl
114     dpl-wrt-dao-ro
115     dpl-wrt-dao-rw
116     ace
117     ace-dao-ro
118     ace-dao-rw
119     ecore-x
120     elm-webview
121     xmlsec1
122     libidn
123     libiri
124     libpcrecpp
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_DEP_CORE_BASE_SOURCE}
136     ${INSTALLER_SOURCES}
137     )
138
139 ADD_DEFINITIONS(${INSTALLER_STATIC_DEP_CFLAGS})
140 ADD_DEFINITIONS(${INSTALLER_STATIC_DEP_CFLAGS_OTHERS})
141
142 TARGET_LINK_LIBRARIES(${TARGET_INSTALLER_STATIC}
143     ${INSTALLER_STATIC_DEP_LIBRARIES}
144     )
145
146 SET_TARGET_PROPERTIES(${TARGET_INSTALLER_STATIC} PROPERTIES
147         COMPILE_FLAGS -fPIC)
148
149 ADD_SUBDIRECTORY(pkg-manager)
150 ADD_SUBDIRECTORY(wrt-installer)
151 ADD_SUBDIRECTORY(config_generator)