CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(ug-email-setting-efl C) SET(SRCS ./src/email-setting.c ./src/email-setting-view.c ./src/email-setting-account-set.c ./src/email-view-setting.c ./src/email-view-account-options.c ./src/email-view-sp-select.c ./src/email-view-account-setup.c ./src/email-view-manual-setup.c ./src/email-view-account-edit.c ./src/email-view-mailbox-mapping.c ./src/email-view-initial.c ./src/email-view-sync-schedule.c ./src/email-view-sync-setup.c ./src/email-setting-utils.c ) SET(CMAKE_SKIP_BUILD_RPATH TRUE) IF("${CMAKE_BUILD_TYPE}" STREQUAL "") SET(CMAKE_BUILD_TYPE "Release") ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "") MESSAGE("Build type: ${CMAKE_BUILD_TYPE}") SET(CMAKE_SETTING_SOURCE_DIR "${CMAKE_SOURCE_DIR}/setting") SET(CMAKE_SETTING_BINARY_DIR "${CMAKE_BINARY_DIR}/setting") INCLUDE_DIRECTORIES(${CMAKE_SETTING_SOURCE_DIR}/include) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/common/include) INCLUDE(FindPkgConfig) pkg_check_modules(pkgs-setting REQUIRED ecore glib-2.0 gobject-2.0 elementary utilX vconf appcore-efl email-service ui-gadget-1 bundle dlog edbus capi-appfw-application status libxml-2.0 contacts-service2 accounts-svc) FOREACH(flag ${pkgs-setting_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden") #SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -finstrument-functions") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") FIND_PROGRAM(UNAME NAMES uname) EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH") IF("${ARCH}" STREQUAL "arm") ADD_DEFINITIONS("-DTARGET") MESSAGE("add -DTARGET") SET(CMAKE_C_FLAGS_RELEASE "-mabi=aapcs-linux -msoft-float -O2") ENDIF("${ARCH}" STREQUAL "arm") ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") ADD_DEFINITIONS("-DDEBUG") ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} email-common ${pkgs-setting_LDFLAGS}) ADD_CUSTOM_TARGET(email-setting-theme.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images ${CMAKE_SETTING_SOURCE_DIR}/theme/email-setting-theme.edc ${CMAKE_SETTING_BINARY_DIR}/email-setting-theme.edj DEPENDS ${CMAKE_SETTING_SOURCE_DIR}/theme/email-setting-theme.edc ) ADD_DEPENDENCIES(${PROJECT_NAME} email-setting-theme.edj) INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${UGDIR}) INSTALL(FILES ${CMAKE_SETTING_BINARY_DIR}/email-setting-theme.edj DESTINATION ${EDJDIR}) INSTALL(FILES ${CMAKE_SETTING_BINARY_DIR}/include/sp_list.xml DESTINATION ${XMLDIR})