tizen beta release
[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(WRT_INSTALLER_SOURCES
26     ${WRT_INSTALLER_DIR}/wrt_installer.cpp
27     ${WRT_INSTALLER_DIR}/wrt_installer_api.cpp
28     ${WRT_INSTALLER_DIR}/installer_callbacks_translate.cpp
29     ${WRT_INSTALLER_DIR}/plugin_utils.cpp
30     ${WRT_INSTALLER_DIR}/language_subtag_rst_tree.cpp
31     ${WRT_INSTALLER_DIR}/installer_main_thread.cpp
32     ${WRT_INSTALLER_DIR}/option_parser.cpp
33 )
34
35 PKG_CHECK_MODULES(WRT_INSTALLER_DEPS
36     pkgmgr-installer
37     libpcrecpp
38     REQUIRED)
39
40 INCLUDE_DIRECTORIES(
41     ${WRT_INSTALLER_DEP_INCLUDES}
42     ${WRT_INSTALLER_INCLUDES}
43     ${WRT_INSTALLER_DEPS_INCLUDE_DIRS}
44 )
45
46 ADD_EXECUTABLE(${TARGET_INSTALLER}
47     ${TARGET_INSTALLER_STATIC_SRC}
48     ${WRT_INSTALLER_SOURCES}
49 )
50
51 ADD_DEFINITIONS("-DSEPARATE_INSTALLER_FOR_DAO") # TODO do not use ifdefs!
52 ADD_DEFINITIONS(${WRT_INSTALLER_DEPS_CFLAGS})
53
54 TARGET_LINK_LIBRARIES(${TARGET_INSTALLER}
55     ${TARGET_INSTALLER_STATIC}
56     ${WRT_INSTALLER_DEPS_LIBRARIES}
57 )
58
59
60 SET_TARGET_PROPERTIES(${TARGET_INSTALLER} PROPERTIES
61     LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both -Wl"
62     BUILD_WITH_INSTALL_RPATH ON
63     INSTALL_RPATH_USE_LINK_PATH ON
64 )
65
66 INSTALL(TARGETS ${TARGET_INSTALLER} DESTINATION bin)