Merge branch 'tizen_3.0' into tizen
[platform/core/system/system-popup.git] / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 PROJECT(${PKGNAME} C)
3
4 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
5 SET(SYSTEM_RESDIR "${PREFIX}/share/system-apps/res")
6 SET(SYSTEM_ICONDIR "${SYSTEM_RESDIR}/icons")
7 SET(LICENSE_DIR "${TZ_SYS_RO_SHARE}/license")
8 SET(DBUS_SERVICE_DIR "${TZ_SYS_RO_SHARE}/dbus-1/system-services")
9 SET(LOCALE_DIR "${TZ_SYS_RO_SHARE}/locale")
10 SET(LANG_DOMAIN "${PKGNAME}")
11
12 ADD_DEFINITIONS("-DPKGNAME=\"${PKGNAME}\"")
13 ADD_DEFINITIONS("-DLOCALE_DIR=\"${LOCALE_DIR}\"")
14 ADD_DEFINITIONS("-DLANG_DOMAIN=\"${LANG_DOMAIN}\"")
15 ADD_DEFINITIONS("-DSYSTEM_ICONDIR=\"${SYSTEM_ICONDIR}\"")
16 ADD_DEFINITIONS("-DPROFILE=\"${PROFILE}\"")
17 ADD_DEFINITIONS("-DFORMFACTOR=\"${FORMFACTOR}\"")
18
19 IF(PROFILE STREQUAL mobile)
20         OPTION(PROFILE_MOBILE "Mobile device" ON)
21         ADD_DEFINITIONS("-DPROFILE_MOBILE=\"${PROFILE_MOBILE}\"")
22 ENDIF()
23 IF(PROFILE STREQUAL wearable)
24         OPTION(PROFILE_WEARABLE "Wearable device" ON)
25         ADD_DEFINITIONS("-DPROFILE_WEARABLE=\"${PROFILE_WEARABLE}\"")
26 ENDIF()
27 IF(PROFILE STREQUAL tv)
28         OPTION(PROFILE_TV "TV device" ON)
29         ADD_DEFINITIONS("-DPROFILE_TV=\"${PROFILE_TV}\"")
30 ENDIF()
31
32 SET(COMMON_DIR "${CMAKE_SOURCE_DIR}/src/common")
33 SET(COMMON_SRCS
34                 ${COMMON_DIR}/core.c
35                 ${COMMON_DIR}/popup-common.c
36                 ${COMMON_DIR}/popup-ui.c
37 )
38
39 IF("${FORMFACTOR}" STREQUAL "circle")
40         SET(COMMON_SRCS ${COMMON_SRCS}
41                         ${COMMON_DIR}/popup-ui-circle.c)
42 ELSE()
43         SET(COMMON_SRCS ${COMMON_SRCS}
44                         ${COMMON_DIR}/popup-ui-normal.c)
45 ENDIF()
46
47
48 # DPMS
49 IF("${DPMS}" STREQUAL "wayland")
50 SET(COMMON_SRCS ${COMMON_SRCS}
51                 ${COMMON_DIR}/popup-ui-dpms-wayland.c)
52 ELSE()
53 SET(COMMON_SRCS ${COMMON_SRCS}
54                 ${COMMON_DIR}/popup-ui-dpms-none.c)
55 ENDIF()
56
57 ADD_SUBDIRECTORY(src)
58 ADD_SUBDIRECTORY(src/powerkey)
59 ADD_SUBDIRECTORY(src/crash)
60 ADD_SUBDIRECTORY(src/overheat)
61 ADD_SUBDIRECTORY(src/launcher)
62 ADD_SUBDIRECTORY(src/po)
63 ADD_SUBDIRECTORY(signal-sender)
64 ADD_SUBDIRECTORY(system-cooperator)