Initialize Tizen 2.3
[framework/web/wrt-plugins-common.git] / src_mobile / plugins-installer / 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   Andrzej Surdej (a.surdej@samsung.com)
18 # @version  1.0
19 #
20
21 SET(TARGET_PLUGINS_INSTALLER "wrt-plugins-installer")
22
23 SET(WRT_PLUGINS_INSTALLER_SRC_DIR
24     ${CMAKE_CURRENT_SOURCE_DIR}
25 )
26
27 PKG_CHECK_MODULES(PLUGINS_INSTALLER_DEPS
28     libxml-2.0
29     cert-svc-vcore
30     dpl-efl
31     dpl-wrt-dao-rw
32     libpcrecpp
33     REQUIRED
34 )
35
36 INCLUDE_DIRECTORIES(
37     ${WRT_PLUGINS_INSTALLER_SRC_DIR}
38     ${PLUGINS_INSTALLER_INCLUDES}
39     ${PLUGINS_INSTALLER_DEPS_INCLUDE_DIRS}
40     ${PLUGINS_API_SUPPORT_DIRS}
41 )
42
43 SET(WRT_PLUGINS_INSTALLER_SOURCES
44     ${WRT_PLUGINS_INSTALLER_SRC_DIR}/wrt_plugins_installer.cpp
45     ${WRT_PLUGINS_INSTALLER_SRC_DIR}/plugin_installer.cpp
46     ${WRT_PLUGINS_INSTALLER_SRC_DIR}/plugin_utils.cpp
47     ${WRT_PLUGINS_INSTALLER_SRC_DIR}/plugin_objects.cpp
48     ${WRT_PLUGINS_INSTALLER_SRC_DIR}/plugin_metafile_reader.cpp
49 )
50
51 ADD_DEFINITIONS(${PLUGINS_INSTALLER_DEPS_CFLAGS})
52 ADD_DEFINITIONS(${PLUGINS_INSTALLER_DEPS_CFLAGS_OTHERS})
53
54 ADD_EXECUTABLE(${TARGET_PLUGINS_INSTALLER}
55     ${WRT_PLUGINS_INSTALLER_SOURCES}
56 )
57
58 TARGET_LINK_LIBRARIES(${TARGET_PLUGINS_INSTALLER}
59     ${PLUGINS_INSTALLER_DEPS_LIBRARIES}
60     ${TARGET_PLUGINS_API_SUPPORT} "-ldl"
61 )
62
63 SET_TARGET_PROPERTIES(${TARGET_PLUGINS_INSTALLER} PROPERTIES
64     LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both"
65     BUILD_WITH_INSTALL_RPATH ON
66     INSTALL_RPATH_USE_LINK_PATH ON
67 )
68
69 INSTALL(TARGETS ${TARGET_PLUGINS_INSTALLER} DESTINATION bin)