Fix memory leak
[platform/framework/web/wrt.git] / src / wrt-launcher / 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 SET(LAUNCHER "wrt-launcher")
17
18 SET(LAUNCHER_SRCS
19     wrt-launcher.cpp
20 )
21
22 PKG_CHECK_MODULES(LAUNCHER_PKGS
23     dpl-efl
24     dpl-db-efl
25     dpl-wrt-dao-rw
26     dpl-wrt-dao-ro
27     REQUIRED
28 )
29
30 PKG_CHECK_MODULES(SYS_LAUNCHER_PKGS
31     capi-appfw-app-manager
32     REQUIRED
33 )
34
35 INCLUDE_DIRECTORIES(${LAUNCHER_PKGS_INCLUDE_DIRS})
36 INCLUDE_DIRECTORIES(SYSTEM ${SYS_LAUNCHER_PKGS_INCLUDE_DIRS})
37
38 ADD_EXECUTABLE(${LAUNCHER}
39     ${LAUNCHER_SRCS}
40 )
41
42 TARGET_LINK_LIBRARIES(${LAUNCHER}
43     ${LAUNCHER_PKGS_LIBRARIES}
44     ${SYS_LAUNCHER_PKGS_LIBRARIES}
45     ${WRT_ENGINE_DEPS_LIBRARIES}
46     ${SYS_WRT_ENGINE_DEPS_LIBRARIES}
47 )
48
49 SET_TARGET_PROPERTIES(${LAUNCHER} PROPERTIES
50     LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both -Wl,--version-script=${PROJECT_SOURCE_DIR}/wrt-engine.map"
51     BUILD_WITH_INSTALL_RPATH ON
52     INSTALL_RPATH_USE_LINK_PATH ON
53 )
54
55 INSTALL(TARGETS ${LAUNCHER}
56     DESTINATION bin
57     PERMISSIONS OWNER_READ
58                 OWNER_WRITE
59                 OWNER_EXECUTE
60 )