Remove hardcoded path for multiuser support
[platform/framework/web/wrt-installer.git] / src / wrt-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   Lukasz Wrzosek (l.wrzosek@samsung.com)
18 # @version     1.0
19 #
20
21 SET(WRT_INSTALLER_DIR
22     ${INSTALLER_SRC_DIR}/wrt-installer
23     )
24
25 SET(PKG_MANAGER_DIR
26     ${INSTALLER_SRC_DIR}/pkg-manager
27     )
28
29 SET(WRT_INSTALLER_SOURCES
30     ${WRT_INSTALLER_DIR}/wrt-installer.cpp
31     ${WRT_INSTALLER_DIR}/wrt_installer_api.cpp
32     ${WRT_INSTALLER_DIR}/installer_callbacks_translate.cpp
33     ${WRT_INSTALLER_DIR}/plugin_utils.cpp
34 #    ${WRT_INSTALLER_DIR}/language_subtag_rst_tree.cpp
35     ${WRT_INSTALLER_DIR}/installer_main_thread.cpp
36     ${WRT_INSTALLER_DIR}/option_parser.cpp
37     ${PKG_MANAGER_DIR}/pkgmgr_signal.cpp
38 )
39
40 PKG_CHECK_MODULES(WRT_INSTALLER_DEPS
41     pkgmgr-installer
42     libpcrecpp
43     pkgmgr-info
44     pkgmgr
45     security-install
46     wrt-commons-i18n-dao-ro
47     libtzplatform-config
48     REQUIRED)
49
50 INCLUDE_DIRECTORIES(
51     ${PKG_MANAGER_DIR}
52     ${WRT_INSTALLER_DEP_INCLUDES}
53     ${WRT_INSTALLER_INCLUDES}
54     ${WRT_INSTALLER_DEPS_INCLUDE_DIRS}
55 )
56
57 ADD_EXECUTABLE(${TARGET_INSTALLER}
58     ${TARGET_INSTALLER_STATIC_SRC}
59     ${WRT_INSTALLER_SOURCES}
60 )
61
62 ADD_DEFINITIONS(${WRT_INSTALLER_DEPS_CFLAGS})
63
64 TARGET_LINK_LIBRARIES(${TARGET_INSTALLER}
65     ${TARGET_INSTALLER_STATIC}
66     ${WRT_INSTALLER_DEPS_LIBRARIES}
67 )
68
69
70 SET_TARGET_PROPERTIES(${TARGET_INSTALLER} PROPERTIES
71     LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both"
72     BUILD_WITH_INSTALL_RPATH ON
73     INSTALL_RPATH_USE_LINK_PATH ON
74 )
75
76 INSTALL(TARGETS ${TARGET_INSTALLER} DESTINATION bin)