0e75438dc305a69fe0e09572d7638c0030db9865
[platform/framework/web/web-provider.git] / src / Daemon / CMakeLists.txt
1 # Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
2 #
3 #    Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 # @author   Yunchan Cho (yunchan.cho@samsung.com)
16
17 SET(TARGET_NAME ${TARGET_DAEMON})
18 SET(DEPS ${TARGET_NAME}_DEPS)
19
20 PKG_CHECK_MODULES(${DEPS}
21     aul
22     bundle
23     appcore-efl
24     elementary
25     ecore-x
26     provider
27     livebox-service
28     capi-appfw-application
29     dlog
30     REQUIRED
31 )
32 ADD_DEFINITIONS(${${DEPS}_CFLAGS})
33
34 SET(SRCS
35     ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
36     ${CMAKE_CURRENT_SOURCE_DIR}/BoxDaemon.cpp
37     ${CMAKE_CURRENT_SOURCE_DIR}/BoxDaemonImpl.cpp
38     ${CMAKE_CURRENT_SOURCE_DIR}/BoxDaemonUtil.cpp
39 )
40
41 SET(HEADERS
42     ${${DEPS}_INCLUDE_DIRS}
43     ${CMAKE_CURRENT_SOURCE_DIR}
44 )
45 INCLUDE_DIRECTORIES(${HEADERS})
46
47 ADD_EXECUTABLE(${TARGET_NAME} ${SRCS})
48
49 SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
50     COMPILE_FLAGS -fPIC
51     LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both"
52 )
53
54 TARGET_LINK_LIBRARIES(${TARGET_NAME} 
55     ${${DEPS}_LDFLAGS} "-ldl"
56     ${${DEPS}_LIBRARIES}
57     ${TARGET_PLUGIN}
58     ${TARGET_CORE}
59     ${TARGET_API}
60 )
61
62 INSTALL(TARGETS ${TARGET_NAME}
63     DESTINATION /usr/apps/livebox.${PROJECT_NAME}/bin
64     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
65     GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
66 )