[JIRA:TT-42] support to circular focus in all scrollers
[profile/tv/apps/native/homescreen.git] / CMakeLists.txt
1 # Copyright (c) 2014 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 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
17 PROJECT("homescreen-tv-ref" C)
18
19 IF(NOT DEFINED PACKAGE_NAME)
20         SET(PACKAGE_NAME "org.tizen.homescreen-tv-ref")
21 ENDIF(NOT DEFINED PACKAGE_NAME)
22
23 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
24 IF(NOT DEFINED BINDIR)
25         SET(BINDIR"${PREFIX}/bin")
26 ENDIF(NOT DEFINED BINDIR)
27 IF(NOT DEFINED IMAGEDIR)
28         SET(IMAGEDIR "${PREFIX}/res/images")
29 ENDIF(NOT DEFINED IMAGEDIR)
30 IF(NOT DEFINED CFGDIR)
31         SET(CFGDIR "${PREFIX}/res/config")
32 ENDIF(NOT DEFINED CFGDIR)
33 IF(NOT DEFINED LOCALEDIR)
34         SET(LOCALEDIR "${PREFIX}/res/locale")
35 ENDIF(NOT DEFINED LOCALEDIR)
36 IF(NOT DEFINED MANIFESTDIR)
37         SET(MANIFESTDIR "/usr/share/packages")
38 ENDIF(NOT DEFINED MANIFESTDIR)
39
40 SET(TARGET_EDJ "${PROJECT_NAME}.edj")
41 SET(THEME_EDJ "${PROJECT_NAME}-theme.edj")
42 SET(DEF_CONFIG "${PROJECT_NAME}.json")
43 SET(SRCS
44                 src/homescreen.c
45                 src/hbar.c
46                 src/ubar.c
47                 src/dbar.c
48                 src/cbar.c
49                 src/xbar.c
50                 src/engine.c
51                 src/bus.c
52                 src/main.c)
53
54 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
55 ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE_NAME}\"")
56 ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"")
57 ADD_DEFINITIONS("-DEDJEFILE=\"${EDJEDIR}/${TARGET_EDJ}\"")
58 ADD_DEFINITIONS("-DTHEMEFILE=\"${EDJEDIR}/${THEME_EDJ}\"")
59 ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
60 ADD_DEFINITIONS("-DDEF_CONFIG=\"${CFGDIR}/${DEF_CONFIG}\"")
61
62 INCLUDE(FindPkgConfig)
63 pkg_check_modules(PKGS REQUIRED
64                 elementary
65                 dlog
66                 json-glib-1.0
67                 gio-2.0
68                 aul
69                 libgum
70                 cynara-client
71                 app-content-favorite
72                 app-content-provider
73                 app-content-history
74                 capi-appfw-application)
75
76 FOREACH(flag ${PKGS_CFLAGS})
77         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
78 ENDFOREACH(flag)
79
80 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
81 ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
82 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${PKGS_LDFLAGS})
83 CONFIGURE_FILE(${PACKAGE_NAME}.xml.in ${PACKAGE_NAME}.xml)
84
85 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
86 INSTALL(FILES ${PACKAGE_NAME}.xml DESTINATION ${MANIFESTDIR})
87 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/images/ DESTINATION ${IMAGEDIR} FILES_MATCHING PATTERN "*.png")
88
89 ADD_SUBDIRECTORY(edje)
90 ADD_SUBDIRECTORY(config)