summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJinkun Jang <jinkun.jang@samsung.com>2013-03-13 01:38:14 +0900
committerJinkun Jang <jinkun.jang@samsung.com>2013-03-13 01:38:14 +0900
commit969f37c04504a239fbf276b77de7fca382dac8ed (patch)
tree13cadb204f1bfaa573f00432e9c13b06d38d309f /CMakeLists.txt
parentceed46babf13948ca94e19d0047c991fc861a549 (diff)
downloadsat-ui-969f37c04504a239fbf276b77de7fca382dac8ed.tar.gz
sat-ui-969f37c04504a239fbf276b77de7fca382dac8ed.tar.bz2
sat-ui-969f37c04504a239fbf276b77de7fca382dac8ed.zip
Tizen 2.1 base
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt120
1 files changed, 120 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100755
index 0000000..8655120
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,120 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(sat-ui C)
+
+SET(SRCS
+ src/sat-ui.c
+ src/sat-ui-icon.c
+ src/setup-menu-view.c
+ src/select-item-view.c
+ src/display-text-view.c
+ src/get-input-view.c
+ src/get-inkey-view.c
+ src/tel-request.c
+ src/winset.c
+)
+
+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)
+
+SET(PKG_NAME org.tizen.sat-ui)
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(BINDIR "${PREFIX}/bin")
+SET(RESDIR "${PREFIX}/res")
+SET(DATADIR "${PREFIX}/data")
+SET(LOCALEDIR "${RESDIR}/locale")
+SET(ICONDIR "${RESDIR}/icons/default/small")
+SET(EDJDIR "${RESDIR}/edje")
+SET(IMGDIR "${RESDIR}/images")
+SET(MEDIADIR "${RESDIR}/media")
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+ appcore-efl
+ tapi
+ elementary
+ mm-sound
+ aul
+ vconf
+ glib-2.0
+ gio-2.0
+ gobject-2.0
+ libprivilege-control
+ ecore-imf
+ ecore-x
+ evas
+ ecore
+ edje
+ ecore-input
+ eina
+ sysman
+ notification
+ rua
+)
+
+FOREACH(flag ${pkgs_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+#SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -finstrument-functions")
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+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("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DSLP_DEBUG")
+ADD_DEFINITIONS("-DLARGE_ICON")
+#ADD_DEFINITIONS("-DSLP_SYSLOG_OUT")
+
+#SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
+
+ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+
+ADD_CUSTOM_TARGET(sat-ui.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/data/image
+ ${CMAKE_SOURCE_DIR}/data/sat-ui.edc ${CMAKE_BINARY_DIR}/sat-ui.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/data/sat-ui.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} sat-ui.edj)
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/sat-ui.edj DESTINATION ${PREFIX}/res/edje)
+
+# install desktop file & icon
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+#CONFIGURE_FILE(${PROJECT_NAME}.desktop.in ${PROJECT_NAME}.desktop)
+#INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.desktop DESTINATION share/install-info/application/)
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/data/sound/ DESTINATION ${MEDIADIR} FILES_MATCHING PATTERN "*.wav")
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/data/image/ DESTINATION ${IMGDIR} FILES_MATCHING PATTERN "*.png")
+#INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/data/theme/ DESTINATION ${IMGDIR} FILES_MATCHING PATTERN "*.png")
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/image/${PKG_NAME}.png DESTINATION /usr/share/icons/default/small)
+# In security reason, supress the dbus auto activation
+INSTALL(FILES ${CMAKE_BINARY_DIR}/data/${PKG_NAME}.service DESTINATION /usr/share/dbus-1/services)
+
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME ${PKG_NAME})
+
+# install application HOME directory
+INSTALL(DIRECTORY DESTINATION ${DATADIR})
+
+# install ini file
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PROJECT_NAME}.ini DESTINATION /usr/share/process-info)
+
+# i18n
+ADD_SUBDIRECTORY(po)
+
+ #Idle_screen
+ ADD_SUBDIRECTORY(sat-event-downloader)
+
+