INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/include) SET(VIEWER contacts-viewer) SET(SRCS viewer.c) SET(VV_PKGNAME "org.tizen.${VIEWER}") SET(VV_PREFIX "/opt/apps/${VV_PKGNAME}") SET(VV_BINDIR "${VV_PREFIX}/bin") SET(VV_RESDIR "${VV_PREFIX}/res") SET(VV_DATADIR "${VV_PREFIX}/data") INCLUDE(FindPkgConfig) ADD_DEFINITIONS("-DVV_PACKAGE=\"${VIEWER}\"") ADD_DEFINITIONS("-DVV_PACKAGE_NAME=\"${VV_PKGNAME}\"") ADD_EXECUTABLE(${VIEWER} ${SRCS}) SET_TARGET_PROPERTIES(${VIEWER} PROPERTIES COMPILE_FLAGS "${EXTRA_CFLAGS} -fpie") TARGET_LINK_LIBRARIES(${VIEWER} ug-contacts-details-efl ${pkgs_LDFLAGS} "-pie") INSTALL(TARGETS ${VIEWER} DESTINATION ${VV_BINDIR}) INSTALL(DIRECTORY DESTINATION ${VV_DATADIR}) # install desktop file & icon CONFIGURE_FILE(${VIEWER}.desktop.in ${CMAKE_BINARY_DIR}/${VV_PKGNAME}.desktop) INSTALL(FILES ${CMAKE_BINARY_DIR}/${VV_PKGNAME}.desktop DESTINATION "/opt/share/applications") INSTALL(FILES icon_${VIEWER}.png DESTINATION "${VV_RESDIR}/icons/default/small" RENAME "${VV_PKGNAME}.png")