summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJihoon Jung <jh8801.jung@samsung.com>2016-04-05 14:03:25 +0900
committerJihoon Jung <jh8801.jung@samsung.com>2016-04-05 14:10:22 +0900
commita9640a1435fdf560d90e103bf8dc009cfb56cd6a (patch)
treea0e7a4e20ae77e865fec1af156b21ff33969e9c2 /CMakeLists.txt
parentf007b06fbb6683a098263f7995ee932dfc5259eb (diff)
downloadug-nfc-efl-a9640a1435fdf560d90e103bf8dc009cfb56cd6a.tar.gz
ug-nfc-efl-a9640a1435fdf560d90e103bf8dc009cfb56cd6a.tar.bz2
ug-nfc-efl-a9640a1435fdf560d90e103bf8dc009cfb56cd6a.zip
- Remove unused code - Apply 3.0 efl code - Remove unused file Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com> Change-Id: Idf54ce0b53be216dbdab4c285a8b1b2602b665e0
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-x[-rw-r--r--]CMakeLists.txt87
1 files changed, 85 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7cb8ed7..435f9ed 100644..100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,88 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(ug-nfc-efl C)
-MESSAGE("NFC UI Gardet version: ${VERSION}")
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(EXEC_PREFIX "\${prefix}")
+SET(LIBDIR "\${prefix}/lib")
+SET(INCLUDEDIR "\${prefix}/include")
+SET(VERSION 0.1.0)
+SET(RESDIR "${PREFIX}/res")
+SET(LOCALEDIR "${RESDIR}/locale")
+SET(EDJDIR "${RESDIR}/edje/${PROJECT_NAME}")
+SET(ICONDIR "${RESDIR}/icons/${PROJECT_NAME}")
-ADD_SUBDIRECTORY(ug-nfc-setting-efl)
+ADD_DEFINITIONS("-DPACKAGE=\"ug-nfc-efl\"")
+ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
+ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
+ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
+ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"")
+
+SET(SRCS
+src/ug-nfc-setting-main.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_CURRENT_SOURCE_DIR}/include)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs_ug_nfc_setting REQUIRED
+ecore-evas
+elementary
+efl-extension
+ui-gadget-1
+dlog
+vconf
+capi-appfw-application
+capi-network-nfc
+capi-appfw-app-manager
+sqlite3
+notification
+)
+
+FOREACH(flag ${pkgs_ug_nfc_setting_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror-implicit-function-declaration")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+SET(CMAKE_C_FLAGS_RELEASE "-O2")
+
+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")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
+ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
+ADD_DEFINITIONS("-D_SBEAM_SUPPORT_")
+
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION 0.1.0)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_ug_nfc_setting_LDFLAGS})
+
+ADD_CUSTOM_TARGET(ug-nfc-efl.edj
+ COMMAND edje_cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/data/edc/ug-nfc-efl.edc ${CMAKE_BINARY_DIR}/ug-nfc-efl.edj
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/data/edc/ug-nfc-efl.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} ug-nfc-efl.edj)
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/ug-nfc-efl.edj DESTINATION ${EDJDIR})
+
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/icons/setting-nfc.png DESTINATION ${ICONDIR})
+
+# install xml file
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ug-nfc-efl.xml DESTINATION /usr/share/packages/)
+
+ADD_SUBDIRECTORY(po)