Terminate HereView when closing HereManager
[platform/core/location/maps-plugin-here.git] / heremaps-uc / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 PROJECT(heremaps-uc C)
3 SET(PKG_NAME org.tizen.heremaps-uc)
4
5 # Version control
6 SET(VERSION_MAJOR 0)
7 SET(VERSION "${VERSION_MAJOR}.0.1")
8
9 # Architecture
10 FIND_PROGRAM(UNAME NAMES uname)
11 EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
12 IF("${ARCH}" STREQUAL "arm")
13     ADD_DEFINITIONS("-D_SOUND_EQ_ARCH_ARM_")
14 ENDIF()
15
16 SET(COMMON_C_FLAGS "${CMAKE_C_FLAGS} -fPIE")
17
18 SET(HERE_PREFIX /usr/apps/org.tizen.heremaps-uc)
19 SET(BINDIR "${HERE_PREFIX}/bin")
20 SET(LIBDIR "${HERE_PREFIX}/lib")
21 SET(RESDIR "${HERE_PREFIX}/res")
22 SET(LOCALE_DIR "${RESDIR}/locale")
23 SET(IMGDIR "${RESDIR}/images")
24 SET(EDJ_DIR "${RESDIR}/edje")
25
26 IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
27         SET(CMAKE_BUILD_TYPE "Release")
28 ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
29 MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
30
31 INCLUDE(FindPkgConfig)
32
33 # Check external libraries
34 INCLUDE(FindPkgConfig)
35 pkg_check_modules(HEREMAPS_UC_EXT_LIBS "REQUIRED" glib-2.0 gthread-2.0 efl-extension capi-appfw-application capi-system-info evas elementary dlog vconf appcore-efl ecore)
36
37 SET(EXTRA_CFLAGS "")
38 FOREACH(flag ${${HEREMAPS_UC_EXT_LIBS}_CFLAGS})
39         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
40 ENDFOREACH(flag)
41
42 SET(CMAKE_C_FLAGS "${COMMON_C_FLAGS} ${EXTRA_CFLAGS}")
43
44 ADD_DEFINITIONS("-DHEREMAPS_UC_PKG=\"${PKG_NAME}\"")
45 ADD_DEFINITIONS("-DPROJECT_NAME=\"${PROJECT_NAME}\"")
46 ADD_DEFINITIONS("-DRES_DIR=\"${RESDIR}\"")
47 ADD_DEFINITIONS("-DLOCALE_DIR=\"${LOCALE_DIR}\"")
48 ADD_DEFINITIONS("-DEDJ_DIR=\"${EDJ_DIR}\"")
49
50 ADD_SUBDIRECTORY(src)
51 ADD_SUBDIRECTORY(resources/po)
52 ADD_SUBDIRECTORY(resources/edje)