Initialize Tizen 2.3
[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}/installer_callbacks_translate.cpp
32     ${WRT_INSTALLER_DIR}/plugin_utils.cpp
33     ${WRT_INSTALLER_DIR}/language_subtag_rst_tree.cpp
34     ${WRT_INSTALLER_DIR}/installer_main_thread.cpp
35     ${WRT_INSTALLER_DIR}/command_parser.cpp
36     ${PKG_MANAGER_DIR}/pkgmgr_signal.cpp
37 )
38
39 PKG_CHECK_MODULES(WRT_INSTALLER_DEPS
40     capi-appfw-application
41     pkgmgr-installer
42     libpcrecpp
43     pkgmgr-info
44     pkgmgr
45     capi-security-privilege-manager
46     wrt-commons-i18n-dao-ro
47     capi-system-device
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 ADD_DEFINITIONS("-fPIE")
65
66 TARGET_LINK_LIBRARIES(${TARGET_INSTALLER}
67     ${TARGET_INSTALLER_STATIC}
68     ${WRT_INSTALLER_DEPS_LIBRARIES}
69 )
70
71
72 SET_TARGET_PROPERTIES(${TARGET_INSTALLER} PROPERTIES
73     LINK_FLAGS "-Wl,--as-needed -pie -Wl,--hash-style=both"
74     BUILD_WITH_INSTALL_RPATH ON
75     INSTALL_RPATH_USE_LINK_PATH ON
76 )
77
78 SET_TARGET_PROPERTIES(${TARGET_INSTALLER} PROPERTIES
79     COMPILE_DEFINITIONS LOG_TAG="${LOG_TAG}"
80 )
81
82 INSTALL(TARGETS ${TARGET_INSTALLER} DESTINATION bin)