CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(contacts C) SET(PACKAGE ${PROJECT_NAME}) SET(PKGNAME "org.tizen.${PACKAGE}") SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(BINDIR "${PREFIX}/bin") SET(RESDIR "${PREFIX}/res") SET(DATADIR "${PREFIX}/data") SET(LOCALEDIR "/opt/ug/res/locale") SET(EDC_SRC_DIR "${CMAKE_SOURCE_DIR}/edc") SET(EDJDIR "/opt/ug/res/edje/ug-${PACKAGE}") SET(IMGDIR "/opt/ug/res/images/ug-${PACKAGE}") SET(CMAKE_SKIP_BUILD_RPATH true) SET(VERSION_MAJOR 0) SET(VERSION "${VERSION_MAJOR}.3.1") IF("${CMAKE_BUILD_TYPE}" STREQUAL "") SET(CMAKE_BUILD_TYPE "Release") ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "") MESSAGE("Build type: ${CMAKE_BUILD_TYPE}") INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) INCLUDE(FindPkgConfig) pkg_check_modules(pkgs REQUIRED appcore-efl ui-gadget contacts-service ecore-x evas ecore ecore-input edje eina appsvc) FOREACH(flag ${pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") SET(CMAKE_C_FLAGS_DEBUG "") SET(CMAKE_C_FLAGS_RELEASE "") FIND_PROGRAM(UNAME NAMES uname) EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH") IF("${ARCH}" STREQUAL "arm") ADD_DEFINITIONS("-DTARGET") MESSAGE("add -DTARGET") ENDIF("${ARCH}" STREQUAL "arm") ADD_DEFINITIONS("-DVENDOR=\"${VENDOR}\"") ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"") ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"") ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"") ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"") ADD_DEFINITIONS("-DIMGDIR=\"${IMGDIR}\"") ADD_DEFINITIONS("-DUGDATADIR=\"${UGDATADIR}\"") # install desktop file & icon CONFIGURE_FILE(${PROJECT_NAME}.desktop.in ${PKGNAME}.desktop) INSTALL(FILES ${CMAKE_BINARY_DIR}/${PKGNAME}.desktop DESTINATION "/opt/share/applications") INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/images/ DESTINATION ${IMGDIR}) INSTALL(DIRECTORY DESTINATION ${DATADIR}) ADD_SUBDIRECTORY(lib) ADD_SUBDIRECTORY(app) ADD_SUBDIRECTORY(viewer) # i18n ADD_SUBDIRECTORY(po)