Remove hardcoded path for multiuser support
[platform/framework/web/wrt-plugins-common.git] / src / 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     libtzplatform-config
34     REQUIRED
35 )
36
37 INCLUDE_DIRECTORIES(
38     ${WRT_PLUGINS_INSTALLER_SRC_DIR}
39     ${PLUGINS_INSTALLER_INCLUDES}
40     ${PLUGINS_INSTALLER_DEPS_INCLUDE_DIRS}
41     ${PLUGINS_API_SUPPORT_DIRS}
42 )
43
44 SET(WRT_PLUGINS_INSTALLER_SOURCES
45     ${WRT_PLUGINS_INSTALLER_SRC_DIR}/wrt_plugins_installer.cpp
46     ${WRT_PLUGINS_INSTALLER_SRC_DIR}/plugin_installer.cpp
47     ${WRT_PLUGINS_INSTALLER_SRC_DIR}/plugin_utils.cpp
48     ${WRT_PLUGINS_INSTALLER_SRC_DIR}/plugin_objects.cpp
49     ${WRT_PLUGINS_INSTALLER_SRC_DIR}/plugin_metafile_reader.cpp
50 )
51
52 ADD_DEFINITIONS(${PLUGINS_INSTALLER_DEPS_CFLAGS})
53 ADD_DEFINITIONS(${PLUGINS_INSTALLER_DEPS_CFLAGS_OTHERS})
54
55 ADD_EXECUTABLE(${TARGET_PLUGINS_INSTALLER}
56     ${WRT_PLUGINS_INSTALLER_SOURCES}
57 )
58
59 TARGET_LINK_LIBRARIES(${TARGET_PLUGINS_INSTALLER}
60     ${PLUGINS_INSTALLER_DEPS_LIBRARIES}
61     ${TARGET_PLUGINS_API_SUPPORT} "-ldl"
62 )
63
64 SET_TARGET_PROPERTIES(${TARGET_PLUGINS_INSTALLER} PROPERTIES
65     LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both"
66     BUILD_WITH_INSTALL_RPATH ON
67     INSTALL_RPATH_USE_LINK_PATH ON
68 )
69
70 INSTALL(TARGETS ${TARGET_PLUGINS_INSTALLER} DESTINATION bin)