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.home")
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 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)
40 SET(TARGET_EDJ "${PROJECT_NAME}.edj")
41 SET(DEFCONFIG "${PROJECT_NAME}.json")
42 SET(THEME_EDJ "${PROJECT_NAME}-theme.edj")
48 src/data/data_recent.c
51 src/view/view_user_edit.c
53 src/view/view_recent.c
55 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
56 ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE_NAME}\"")
57 ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"")
58 ADD_DEFINITIONS("-DEDJEFILE=\"${EDJEDIR}/${TARGET_EDJ}\"")
59 ADD_DEFINITIONS("-DTHEMEFILE=\"${EDJEDIR}/${THEME_EDJ}\"")
60 ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
61 ADD_DEFINITIONS("-DDEFCONFIG=\"${CFGDIR}/${DEFCONFIG}\"")
63 INCLUDE(FindPkgConfig)
64 pkg_check_modules(PKGS REQUIRED
70 capi-appfw-application)
72 FOREACH(flag ${PKGS_CFLAGS})
73 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
76 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -Werror")
77 ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
78 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${PKGS_LDFLAGS})
79 CONFIGURE_FILE(${PACKAGE_NAME}.xml.in ${PACKAGE_NAME}.xml)
81 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
82 INSTALL(FILES ${PACKAGE_NAME}.xml DESTINATION ${MANIFESTDIR})
83 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/images/ DESTINATION ${IMAGEDIR} FILES_MATCHING PATTERN "*.png")
85 ADD_SUBDIRECTORY(edje)
86 ADD_SUBDIRECTORY(config)