CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(watch-setting C) SET(SRCS src/setting.c src/setting-sound.c src/setting-vibration.c src/setting-connection.c src/setting-clock.c src/setting-volume-page.c src/setting-info.c src/setting-device.c src/setting-display.c src/setting-language.c src/setting-common-sound.c src/util.c src/setting_data_vconf.c src/setting_view_toast.c src/setting-datausage.c src/setting-mobile-networks.c ) SET(VENDOR "samsung") SET(PACKAGE ${PROJECT_NAME}) SET(PKGNAME "com.${VENDOR}.${PACKAGE}") SET(PREFIX ${CMAKE_INSTALL_PREFIX}) #SET(INSTALL_DIR_APPS "${TZ_SYS_RO_APP}/${PKGNAME}") SET(INSTALL_DIR_PRE "/usr") SET(BINDIR "${PREFIX}/bin") SET(RESDIR "${PREFIX}/res") SET(DATADIR "${PREFIX}/data") SET(LOCALEDIR "${RESDIR}/locale") SET(ICONDIR "${RESDIR}/icons") SET(DESKTOPICONDIR "${ICONDIR}/default/small") SET(EDJ_PATH "${RESDIR}/edje") #SET(EDJ_PATH ".") SET(IMGDIR "./data/images") SET(FAKE_IMG_PATH "${TZ_SYS_RO_APP}/${PKGNAME}/shared/res") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast") IF(FEATURE_EMUL) SET(FEATURE_SETTING_EMUL "1") MESSAGE("emul build!!!!!!!!!") ELSE(FEATURE_EMUL) SET(FEATURE_SETTING_EMUL "0") MESSAGE("target build!!!!!!!!!") ENDIF(FEATURE_EMUL) CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.in ${CMAKE_SOURCE_DIR}/include/watch_setting_config.h) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) INCLUDE(FindPkgConfig) pkg_check_modules(pkgs REQUIRED elementary ecore-imf appcore-common appcore-efl dlog glib-2.0 evas eina edje vconf elementary sensor ecore ecore-input ecore-evas capi-appfw-application pkgmgr pkgmgr-info fontconfig feedback json-glib-1.0 deviced capi-network-bluetooth bluetooth-api capi-system-device capi-media-sound-manager capi-media-player mm-player mm-sound capi-system-system-settings capi-system-info libxml-2.0 capi-media-wav-player #capability-manager capi-content-media-content aul capi-appfw-app-manager alarm-service libtzplatform-config efl-extension capi-network-wifi-manager capi-network-nfc capi-telephony storage capi-base-utils-i18n tapi watch-control capi-location-manager capi-network-stc ) FIND_LIBRARY(LIB_M m) #Icon - app INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.watch-setting.png DESTINATION ${ICONDIR}) INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/images/ DESTINATION ${TZ_SYS_RO_APP}/org.tizen.watch-setting/res/images FILES_MATCHING PATTERN "*") # install media-data INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/media-data-sdk/settings/ DESTINATION ${TZ_SYS_GLOBALUSER_DATA}/settings PATTERN "*") # install langlist xml file IF(FEATURE_EMUL) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/langlist_emul.xml DESTINATION ${DATADIR} RENAME langlist.xml) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/langlist_emul.xml DESTINATION ${TZ_SYS_GLOBALUSER_DATA}/setting RENAME langlist.xml) ELSE(FEATURE_EMUL) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/langlist.xml DESTINATION ${DATADIR}) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/langlist.xml DESTINATION ${TZ_SYS_GLOBALUSER_DATA}/setting) ENDIF(FEATURE_EMUL) # install clocklist xml file INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/clocklist.xml DESTINATION ${DATADIR}) # install media-data INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/fake-img/ DESTINATION ${FAKE_IMG_PATH} FILES_MATCHING PATTERN "*.png") # install Safety.zip INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/Safety.zip DESTINATION /usr/share) ADD_DEFINITIONS(${pkgs_CFLAGS}) ADD_DEFINITIONS("-fpie") ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"") ADD_DEFINITIONS("-DSLP_DEBUG") ADD_DEFINITIONS("-DSLP_PROF") ADD_DEFINITIONS("-DVENDOR=\"${VENDOR}\"") ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"") ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"") ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") ADD_DEFINITIONS("-DINSTALL_DIR_APPS=\"${INSTALL_DIR_APPS}\"") ADD_DEFINITIONS("-DBINDIR=\"${BINDIR}\"") ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"") ADD_DEFINITIONS("-DICON_DIR=\"${ICONDIR}\"") ADD_DEFINITIONS("-DELM_DEMO_EDJ=\"${EDJ_PATH}/${PROJECT_NAME}.edj\"") ADD_DEFINITIONS("-DTZ_SYS_RO_APP_D=\"${TZ_SYS_RO_APP}\"") ADD_DEFINITIONS("-DTZ_SYS_DATA_D=\"${TZ_SYS_DATA}\"") ADD_DEFINITIONS("-DTZ_SYS_ETC_D=\"${TZ_SYS_ETC}\"") ADD_DEFINITIONS("-DTZ_SYS_SHARE_D=\"${TZ_SYS_SHARE}\"") ADD_DEFINITIONS("-DTZ_SYS_GLOBALUSER_DATA_D=\"${TZ_SYS_GLOBALUSER_DATA}\"") ADD_DEFINITIONS("-DTZ_USER_CONTENT_D=\"${TZ_USER_CONTENT}\"") ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} "-pie" ${LIB_M}) #edj compile ADD_CUSTOM_TARGET(${PROJECT_NAME}.edj COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/data/groups/images #data/images ${CMAKE_SOURCE_DIR}/data/${PROJECT_NAME}.edc ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.edj DEPENDS ${CMAKE_SOURCE_DIR}/data/${PROJECT_NAME}.edc ) ADD_DEPENDENCIES(${PROJECT_NAME} ${PROJECT_NAME}.edj) ADD_DEPENDENCIES(${PROJECT_NAME} edj_build) MESSAGE("bindir: ${BINDIR}") INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR}) INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.edj DESTINATION ${EDJ_PATH}) # install application HOME directory INSTALL(DIRECTORY DESTINATION ${DATADIR}) # desktop icon SET(PREFIX ${CMAKE_INSTALL_PREFIX}) CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/org.tizen.watch-setting.xml.in ${CMAKE_SOURCE_DIR}/org.tizen.watch-setting.xml) INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.watch-setting.xml DESTINATION /usr/share/packages) INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.watch-setting.png DESTINATION /usr/share/icons/default/small) INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.watch-setting_small.png DESTINATION /usr/share/icons/default/small) ADD_SUBDIRECTORY(po)