1 # Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
16 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
19 IF(NOT DEFINED PACKAGE_NAME)
20 SET(PACKAGE_NAME "org.tizen.${PROJECT_NAME}")
21 ENDIF(NOT DEFINED PACKAGE_NAME)
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 RESDIR)
28 SET(RESDIR "${PREFIX}/res")
29 ENDIF(NOT DEFINED RESDIR)
30 IF(NOT DEFINED IMAGEDIR)
31 SET(IMAGEDIR "${PREFIX}/res/images/")
32 ENDIF(NOT DEFINED IMAGEDIR)
33 IF(NOT DEFINED EDJEDIR)
34 SET(EDJEDIR "${PREFIX}/res/edje")
35 ENDIF(NOT DEFINED EDJEDIR)
36 IF(NOT DEFINED MANIFESTDIR)
37 SET(MANIFESTDIR "/usr/share/packages")
38 ENDIF(NOT DEFINED MANIFESTDIR)
42 src/view_channelinfo.c
43 src/layout_channelinfo.c
44 src/layout_channelinfo_list.c
45 src/layout_channelinfo_search.c
46 src/view_channelnumber.c
48 src/view_action_menu.c
52 SET(TARGET_EDJ "${PROJECT_NAME}.edj")
53 SET(THEME_EDJ "${PROJECT_NAME}-theme.edj")
55 ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE_NAME}\"")
56 ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"")
57 ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
58 ADD_DEFINITIONS("-DEDJEFILE=\"${EDJEDIR}/${TARGET_EDJ}\"")
59 ADD_DEFINITIONS("-DTHEMEFILE=\"${EDJEDIR}/${THEME_EDJ}\"")
61 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
63 INCLUDE(FindPkgConfig)
64 pkg_check_modules(PKGS REQUIRED
68 capi-appfw-application
77 FOREACH(flag ${PKGS_CFLAGS})
78 SET(EXTRA_CFLGAS "${EXTRA_CFLGAS} ${flag}")
81 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLGAS}")
82 ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
83 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${PKGS_LDFLAGS})
84 CONFIGURE_FILE(${PACKAGE_NAME}.xml.in ${PACKAGE_NAME}.xml)
86 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
87 INSTALL(FILES ${PACKAGE_NAME}.xml DESTINATION ${MANIFESTDIR})
88 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images DESTINATION ${RESDIR})
90 ADD_SUBDIRECTORY(data)