diff options
author | Sehong Na <sehong.na@samsung.com> | 2014-05-31 12:55:16 +0900 |
---|---|---|
committer | Sehong Na <sehong.na@samsung.com> | 2014-05-31 12:55:16 +0900 |
commit | bcf0ca94c63e34ade6a0428f3047384f17adb2aa (patch) | |
tree | 115ecdb76d31814d445f5ea1c07d0a63260ae308 /CMakeLists.txt | |
download | bt-connection-popup-bcf0ca94c63e34ade6a0428f3047384f17adb2aa.tar.gz bt-connection-popup-bcf0ca94c63e34ade6a0428f3047384f17adb2aa.tar.bz2 bt-connection-popup-bcf0ca94c63e34ade6a0428f3047384f17adb2aa.zip |
Initialize Tizen 2.3submit/tizen_2.3/20140531.1025112.3a_releasetizen_2.3
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-x | CMakeLists.txt | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100755 index 0000000..ca46d75 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,89 @@ +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) |