CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(bt-connection-popup C) SET(SRCS src/bt-connection-main.c src/bt-connection-view.c src/bt-connection-handler.c src/bt-connection-ipc.c ) SET(VENDOR "samsung") SET(PACKAGE ${PROJECT_NAME}) SET(PKGNAME "com.${VENDOR}.${PACKAGE}") SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(INSTALL_DIR_APPS "/usr/apps/${PKGNAME}") SET(INSTALL_DIR_PRE "/usr") SET(BINDIR "${PREFIX}/bin") SET(RESDIR "${PREFIX}/res") SET(DATADIR "${PREFIX}/data") SET(ICONDIR "${RESDIR}/icons") SET(LOCALEDIR "${RESDIR}/locale") SET(DESKTOPICONDIR "${ICONDIR}/default/small") SET(EDJDIR "${RESDIR}/edje") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") SET(GC_SECTIONS_FLAGS "-fdata-sections -ffunction-sections -Wl,--gc-sections") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GC_SECTIONS_FLAGS}") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GC_SECTIONS_FLAGS}") INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) IF(FEATURE_TIZENW) ADD_DEFINITIONS("-DFEATURE_TIZENW") ENDIF(FEATURE_TIZENW) INCLUDE(FindPkgConfig) pkg_check_modules(pkgs REQUIRED elementary dlog evas edje vconf ecore-x ecore ecore-input capi-appfw-application efl-assist appcore-efl capi-network-bluetooth dbus-glib-1 edbus ) FIND_LIBRARY(LIB_M m) 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("-DICONDIR=\"${ICONDIR}\"") ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"") ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} "-pie" ${LIB_M}) ADD_CUSTOM_TARGET(${PROJECT_NAME}.edj COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/images ${CMAKE_SOURCE_DIR}/edc/${PROJECT_NAME}.edc ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.edj DEPENDS ${CMAKE_SOURCE_DIR}/edc/${PROJECT_NAME}.edc ) ADD_DEPENDENCIES(${PROJECT_NAME} ${PROJECT_NAME}.edj) INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR}) INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.edj DESTINATION ${EDJDIR}) # install application HOME directory INSTALL(DIRECTORY DESTINATION ${DATADIR}) # desktop icon #INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.bt-connection-popup.png DESTINATION /usr/share/icons/default/small) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.bt-connection-popup.xml DESTINATION /usr/share/packages) INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.bt-connection-popup.rule DESTINATION /etc/smack/accesses2.d/) ADD_SUBDIRECTORY(po)